Skip to content

Commit 8e639dd

Browse files
Update libraries
close resharper issues
1 parent c458e83 commit 8e639dd

4 files changed

Lines changed: 21 additions & 19 deletions

File tree

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System.Diagnostics;
22
using System.IO;
3-
using System.Linq;
43
using System.Threading.Tasks;
54
using Microsoft.VisualStudio.TestTools.UnitTesting;
65
using TextFileConvert;
@@ -12,34 +11,34 @@ namespace TestLineEndingConversion;
1211
[TestClass]
1312
public 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
}

TestLineEndingConversion/TestLineEndingConversion.csproj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77
<LangVersion>latest</LangVersion>
88
</PropertyGroup>
99
<ItemGroup>
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
11-
<PackageReference Include="MSTest.TestAdapter" Version="2.2.3" />
12-
<PackageReference Include="MSTest.TestFramework" Version="2.2.3" />
13-
<PackageReference Include="coverlet.collector" Version="3.0.2" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
11+
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
12+
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
13+
<PackageReference Include="coverlet.collector" Version="6.0.2">
14+
<PrivateAssets>all</PrivateAssets>
15+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
16+
</PackageReference>
1417
</ItemGroup>
1518
<ItemGroup>
1619
<ProjectReference Include="..\TextFileConvert\TextFileConvert.csproj" />

dos2ux/dos2ux.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<ProjectReference Include="..\TextFileConvert\TextFileConvert.csproj" />
3737
</ItemGroup>
3838
<ItemGroup>
39-
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.2" />
39+
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.8" />
4040
</ItemGroup>
4141
<Target Name="Init">
4242
<Warning Text="$(TargetFrameworkMoniker)" />

ux2dos/ux2dos.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<ProjectReference Include="..\TextFileConvert\TextFileConvert.csproj" />
3939
</ItemGroup>
4040
<ItemGroup>
41-
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.2" />
41+
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.8" />
4242
</ItemGroup>
4343
<Target Name="Init">
4444
<Warning Text="$(TargetFrameworkMoniker)" />

0 commit comments

Comments
 (0)