File tree Expand file tree Collapse file tree
MediaConverters.Tests/Tool
MediaConverters.Tool/Contexts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- using DotNetCampus . MediaConverters . Contexts ;
2- using DotNetCampus . MediaConverters . Imaging . Optimizations ;
3-
4- using System ;
5- using System . Collections . Generic ;
6- using System . Linq ;
7- using System . Text ;
8- using System . Text . Json ;
1+ using System . Text . Json ;
92using System . Text . Json . Serialization ;
10- using System . Threading . Tasks ;
3+ using DotNetCampus . MediaConverters . Contexts ;
114
125namespace DotNetCampus . MediaConverters . Tests . Tool ;
136
147[ TestClass ]
158public class MediaConverterTests
169{
10+ [ TestMethod ]
11+ public async Task ReplaceColorTask1 ( )
12+ {
13+ var imageConvertContext = new ImageConvertContext ( )
14+ {
15+ ImageConvertTaskList =
16+ [
17+ new ReplaceColorTask ( )
18+ {
19+ } ,
20+ ]
21+ } ;
22+
23+ var options = ToOptions ( TestFileProvider . DefaultTestImageName , imageConvertContext ) ;
24+
25+ var result = await Program . RunAsync ( options ) ;
26+ Assert . AreEqual ( ErrorCode . Success , result ) ;
27+ TestHelper . OpenFileInExplorer ( new FileInfo ( options . OutputFile ) ) ;
28+ }
29+
1730 [ TestMethod ]
1831 public async Task OptimizeImageFile1 ( )
1932 {
Original file line number Diff line number Diff line change 22
33namespace DotNetCampus . MediaConverters . Contexts ;
44
5- [ JsonDerivedType ( typeof ( ReplaceColorTask ) ) ]
5+ [ JsonDerivedType ( typeof ( ReplaceColorTask ) , typeDiscriminator : nameof ( ReplaceColorTask ) ) ]
66public interface IImageConvertTask
77{
88}
You can’t perform that action at this time.
0 commit comments