Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WCharT.Net.Tests: Update dependencies #33

Merged
merged 1 commit into from
Mar 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/WCharT.Net.Tests/Tests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Runtime.InteropServices;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace WCharT.Tests;
Expand All @@ -13,7 +12,7 @@ public void TestEncoding()
var text = "Test";
var str = new WCharTString(text);

str.GetString().Should().Be(text);
Assert.AreEqual(str.GetString(), text);
}

[TestMethod]
Expand All @@ -23,8 +22,9 @@ public void BufferSizeIsRetained()
var str = new WCharTString(bufferSize);

var result = str.GetString();
result.Should().Be(new string(new[] { char.MinValue, char.MinValue, char.MinValue }));
result.Length.Should().Be(bufferSize);

Assert.AreEqual(result, new string(new[] { char.MinValue, char.MinValue, char.MinValue }));
Assert.AreEqual(result.Length, bufferSize);
}

[TestMethod]
Expand All @@ -47,7 +47,7 @@ public void TestUnicode()
fixed (byte* p = data)
{
var str = new WCharTString(p);
str.GetString().Should().Be(new string(new[] { '\u0100', '\u0100' }));
Assert.AreEqual(str.GetString(), new string(new[] { '\u0100', '\u0100' }));
}
}
#pragma warning restore CA1861
Expand Down Expand Up @@ -79,7 +79,7 @@ public void TestUtf32()
fixed (byte* p = data)
{
var str = new WCharTString(p);
str.GetString().Should().Be(new string(new[] { '\u0100', '\u0100' }));
Assert.AreEqual(str.GetString(), new string(new[] { '\u0100', '\u0100' }));
}
}
#pragma warning restore CA1861
Expand Down
7 changes: 3 additions & 4 deletions src/WCharT.Net.Tests/WCharT.Net.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.5.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.5.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.8.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.8.2" />
</ItemGroup>

<ItemGroup>
Expand Down