Skip to content

Commit 6d3fb21

Browse files
Merge pull request #269 from answerdigital/dependabot/nuget/OmopTransformerTests/MSTest.TestFramework-4.0.1
Bump MSTest.TestFramework from 3.10.4 to 4.0.1
2 parents 0033c1b + 162f285 commit 6d3fb21

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

OmopTransformer/Transformation/Attribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ private Attribute(object value, ILookup? lookup)
1212

1313
public static Attribute Create(object value)
1414
{
15-
ILookup lookup = null;
15+
ILookup? lookup = null;
1616

1717
if (value is TransformAttribute transformAttribute && typeof(ILookup).IsAssignableFrom(transformAttribute.Type))
1818
{

OmopTransformerTests/OmopTransformerTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
<ItemGroup>
2020
<PackageReference Include="JetBrains.Annotations" Version="2025.2.2" />
2121
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
22-
<PackageReference Include="MSTest.TestAdapter" Version="3.10.4" />
23-
<PackageReference Include="MSTest.TestFramework" Version="3.10.4" />
22+
<PackageReference Include="MSTest.TestAdapter" Version="4.0.1" />
23+
<PackageReference Include="MSTest.TestFramework" Version="4.0.1" />
2424
<PackageReference Include="coverlet.collector" Version="6.0.4" />
2525
<PackageReference Include="NSubstitute" Version="5.3.0" />
2626
<PackageReference Include="NUnit" Version="4.4.0" />

OmopTransformerTests/Transformation/StringExtensionsTest.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using Microsoft.VisualStudio.TestTools.UnitTesting;
21
using OmopTransformer;
32

43
[TestClass]
54
public class StringExtensionsTests
65
{
6+
77
[TestMethod]
88
public void SubstringOrNull_ValidInput_ReturnsCorrectSubstring()
99
{
@@ -21,17 +21,14 @@ public void SubstringOrNull_WhitespaceOnly_ReturnsNull()
2121
}
2222

2323
[TestMethod]
24-
[ExpectedException(typeof(ArgumentNullException))]
2524
public void SubstringOrNull_NullInput_ThrowsArgumentNullException()
2625
{
2726
string? text = null;
2827

29-
#pragma warning disable CS8604
30-
text.SubstringOrNull(0, 1);
31-
#pragma warning restore CS8604
28+
Assert.ThrowsExactly<ArgumentNullException>(() => text!.SubstringOrNull(0, 1));
3229
}
3330

34-
[DataTestMethod]
31+
[TestMethod]
3532
[DataRow("", true)]
3633
[DataRow(" ", true)]
3734
[DataRow("hello", false)]
@@ -41,7 +38,7 @@ public void IsEmpty_ReturnsExpectedResult(string input, bool expected)
4138
Assert.AreEqual(expected, input.IsEmpty());
4239
}
4340

44-
[DataTestMethod]
41+
[TestMethod]
4542
[DataRow(" test ", "test")]
4643
[DataRow(null, null)]
4744
[DataRow("", "")]
@@ -50,7 +47,7 @@ public void TrimWhitespace_ReturnsExpectedResult(string input, string expected)
5047
Assert.AreEqual(expected, input.TrimWhitespace());
5148
}
5249

53-
[DataTestMethod]
50+
[TestMethod]
5451
[DataRow("hello\r\n", "hello")]
5552
[DataRow("\r\nhello\r\n", "\r\nhello")]
5653
[DataRow("hello\r\nworld", "hello\r\nworld")]

OmopTransformerTests/Transformation/TransformationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public void TestTransformation()
4141
null!)
4242
.Transform(testConcept, plan);
4343

44-
Assert.AreEqual(testConcept.Text, "hello world");
45-
Assert.AreEqual(testConcept.JoinedText, "line 1\r\nline 2");
44+
Assert.AreEqual("hello world", testConcept.Text);
45+
Assert.AreEqual("line 1\r\nline 2", testConcept.JoinedText);
4646
Assert.AreEqual(1, testConcept.ColourId);
4747
Assert.AreEqual(123, testConcept.ConstantNumber);
4848

0 commit comments

Comments
 (0)