Skip to content
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
8 changes: 4 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
<!-- Testing Packages (all frameworks) -->
<ItemGroup>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageVersion Include="MSTest.TestFramework" Version="4.2.3" />
<PackageVersion Include="MSTest.TestAdapter" Version="4.2.3" />
<PackageVersion Include="MSTest.TestFramework" Version="4.3.2" />
<PackageVersion Include="MSTest.TestAdapter" Version="4.3.2" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.0" />
<PackageVersion Include="FluentAssertions" Version="7.2.2" />
<PackageVersion Include="NSubstitute" Version="6.0.0" />
<PackageVersion Include="Verify.MSTest" Version="31.21.0" />
<PackageVersion Include="Verify.MSTest" Version="31.27.0" />
</ItemGroup>

<!-- Main Dependencies (all frameworks) -->
<ItemGroup>
<PackageVersion Include="Fhir.Metrics" Version="1.3.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.300" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.301" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageVersion Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
Expand Down
4 changes: 3 additions & 1 deletion src/Hl7.Fhir.Support.Tests/Language/TypeSpecifierTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ public void TestConstruction()
[TestMethod]
public void TestEquality()
{
Assert.AreEqual(TypeSpecifier.Concept, TypeSpecifier.Concept);
#pragma warning disable MSTEST0032 // Condition known to be always true - we're testing that Equals handles self-comparison
Assert.AreSame(TypeSpecifier.Concept, TypeSpecifier.Concept);
#pragma warning restore MSTEST0032
Assert.AreNotEqual(TypeSpecifier.Concept, TypeSpecifier.Code);
#pragma warning disable CS1718 // Comparison made to same variable - we're testing the '==' operator here
Assert.IsTrue(TypeSpecifier.Concept == TypeSpecifier.Concept);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public async Task ValueSetValidateCode_SecondCallWithSameParameters_ReturnsCache
var result = await _cachingService.ValueSetValidateCode(_testParameters, "id2", true);

// Assert - Should return cached result and only call underlying service once
Assert.AreEqual(_expectedResult, result);
Assert.AreSame(_expectedResult, result);
await _mockService.Received(1).ValueSetValidateCode(_testParameters, "id1", false);
await _mockService.DidNotReceive().ValueSetValidateCode(_testParameters, "id2", true);
}
Expand All @@ -68,7 +68,7 @@ public async Task Translate_SecondCallWithSameParameters_ReturnsCachedResult()
var result = await _cachingService.Translate(_testParameters, "different-id", true);

// Assert - Should return cached result and only call underlying service once
Assert.AreEqual(_expectedResult, result);
Assert.AreSame(_expectedResult, result);
await _mockService.Received(1).Translate(_testParameters, "original-id", false);
await _mockService.DidNotReceive().Translate(_testParameters, "different-id", true);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Hl7.FhirPath.Tests/Tests/AssertParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static void FailsWith<T>(Parser<T> parser, string input, Action<IResult<T

public static void SucceedsMatch<T>(Parser<T> parser, string input)
{
SucceedsWith<T>(parser, input, result => Assert.AreEqual(input, (IEnumerable<char>)result));
SucceedsWith<T>(parser, input, result => Assert.AreSequenceEqual(input, (IEnumerable<char>)result));
}

public static void SucceedsMatch<T>(Parser<T> parser, string input, T match)
Expand Down
6 changes: 3 additions & 3 deletions src/Hl7.FhirPath.Tests/Tests/CastTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ public void TestUnbox()
{
Assert.IsNull(Typecasts.UnboxTo(emptyColl, typeof(string)));
collection.SequenceEqual(Typecasts.UnboxTo(collection, typeof(IEnumerable<PocoNode>)) as IEnumerable<PocoNode>);
Assert.AreEqual(complex, Typecasts.UnboxTo(singleC, typeof(PocoNode)));
Assert.AreSame(complex, Typecasts.UnboxTo(singleC, typeof(PocoNode)));

Assert.AreEqual(4L, Typecasts.UnboxTo(singleV, typeof(long)));
Assert.AreEqual(4L, Typecasts.UnboxTo(PocoNode.ForPrimitive<Integer64>("4"), typeof(long)));

Assert.AreEqual(complex, Typecasts.UnboxTo(complex, typeof(PocoNode)));
Assert.AreSame(complex, Typecasts.UnboxTo(complex, typeof(PocoNode)));
Assert.IsNull(Typecasts.UnboxTo(null, typeof(string)));
Assert.AreEqual(4L, Typecasts.UnboxTo(4L, typeof(long)));
Assert.AreEqual("hi!", Typecasts.UnboxTo("hi!", typeof(string)));
Expand Down Expand Up @@ -74,7 +74,7 @@ public void CastComplex()

Assert.IsTrue(Typecasts.CanCastTo(complex, typeof(IEnumerable<PocoNode>)));
var result = (IEnumerable<PocoNode>)Typecasts.CastTo(complex, typeof(IEnumerable<PocoNode>));
Assert.AreEqual(complex, result.Single());
Assert.AreSame(complex, result.Single());
checkCast<PocoNode>(complex, complex);
Assert.IsFalse(Typecasts.CanCastTo(collection, typeof(bool)));
Assert.IsFalse(Typecasts.CanCastTo(collection, typeof(bool?)));
Expand Down
Loading