11using System . Diagnostics ;
22using System . IO ;
3- using System . Linq ;
43using System . Threading . Tasks ;
54using Microsoft . VisualStudio . TestTools . UnitTesting ;
65using TextFileConvert ;
@@ -12,34 +11,34 @@ namespace TestLineEndingConversion;
1211[ TestClass ]
1312public class IntegrationTesting
1413{
15- private const string TestunixTxt = "testunix.txt" ;
16- private const string TestdosTxt = "testdos.txt" ;
14+ private const string TestUnixTxt = "testunix.txt" ;
15+ private const string TestDosTxt = "testdos.txt" ;
1716
1817 [ TestMethod ]
1918 public async Task TestDos2Ux ( )
2019 {
2120 // Where am I?
2221 Debug . WriteLine ( Directory . GetCurrentDirectory ( ) ) ;
23- if ( File . Exists ( TestunixTxt ) )
24- File . Delete ( TestunixTxt ) ;
22+ if ( File . Exists ( TestUnixTxt ) )
23+ File . Delete ( TestUnixTxt ) ;
2524
2625 // ensure we start well
2726 var precondition = await File . ReadAllTextAsync ( "dos.txt" ) ;
2827 Assert . IsTrue ( precondition . Contains ( "\r \n " ) ) ;
2928
3029 // Do Conversion
31- var exitCode = await ConvertLineEndings . Dos2Ux ( "dos.txt" , TestunixTxt ) ;
30+ var exitCode = await ConvertLineEndings . Dos2Ux ( "dos.txt" , TestUnixTxt ) ;
3231
3332 // Zero is success
3433 Assert . AreEqual ( exitCode , 0 ) ;
3534
3635 // Compare the test file to the artifact file
37- var result = await File . ReadAllTextAsync ( TestunixTxt ) ;
36+ var result = await File . ReadAllTextAsync ( TestUnixTxt ) ;
3837 Assert . IsFalse ( result . Contains ( "\r \n " ) ) ;
3938 Assert . AreEqual ( await File . ReadAllTextAsync ( "unix.txt" ) , result ) ;
4039
4140 // Clean up
42- File . Delete ( TestunixTxt ) ;
41+ File . Delete ( TestUnixTxt ) ;
4342 }
4443
4544 [ TestMethod ]
@@ -48,25 +47,25 @@ public async Task TestUx2Dos()
4847 // Where am I?
4948 Debug . WriteLine ( Directory . GetCurrentDirectory ( ) ) ;
5049
51- if ( File . Exists ( TestdosTxt ) )
52- File . Delete ( TestdosTxt ) ;
50+ if ( File . Exists ( TestDosTxt ) )
51+ File . Delete ( TestDosTxt ) ;
5352
5453 // ensure we start well
5554 var precondition = await File . ReadAllTextAsync ( "unix.txt" ) ;
5655 Assert . IsFalse ( precondition . Contains ( "\r \n " ) ) ;
5756
5857 // Do Conversion
59- int exitCode = await ConvertLineEndings . Ux2Dos ( "unix.txt" , TestdosTxt ) ;
58+ int exitCode = await ConvertLineEndings . Ux2Dos ( "unix.txt" , TestDosTxt ) ;
6059
6160 // Zero is success
6261 Assert . AreEqual ( exitCode , 0 ) ;
6362
6463 // Compare the test file to the artifact file
65- var result = await File . ReadAllTextAsync ( TestdosTxt ) ;
64+ var result = await File . ReadAllTextAsync ( TestDosTxt ) ;
6665 Assert . IsTrue ( result . Contains ( "\r \n " ) ) ;
6766 Assert . AreEqual ( await File . ReadAllTextAsync ( "dos.txt" ) , result ) ;
6867
6968 // Clean up
70- File . Delete ( TestdosTxt ) ;
69+ File . Delete ( TestDosTxt ) ;
7170 }
7271}
0 commit comments