diff --git a/Directory.Packages.props b/Directory.Packages.props
index f173c5c3ea..14077ec45f 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -8,19 +8,19 @@
-
-
+
+
-
+
-
+
diff --git a/src/Hl7.Fhir.Support.Tests/Language/TypeSpecifierTests.cs b/src/Hl7.Fhir.Support.Tests/Language/TypeSpecifierTests.cs
index 7109cf97d8..edd498af6c 100644
--- a/src/Hl7.Fhir.Support.Tests/Language/TypeSpecifierTests.cs
+++ b/src/Hl7.Fhir.Support.Tests/Language/TypeSpecifierTests.cs
@@ -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);
diff --git a/src/Hl7.Fhir.Support.Tests/Specification/CachingTerminologyServiceTests.cs b/src/Hl7.Fhir.Support.Tests/Specification/CachingTerminologyServiceTests.cs
index c44d7352f8..ce8574253f 100644
--- a/src/Hl7.Fhir.Support.Tests/Specification/CachingTerminologyServiceTests.cs
+++ b/src/Hl7.Fhir.Support.Tests/Specification/CachingTerminologyServiceTests.cs
@@ -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);
}
@@ -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);
}
diff --git a/src/Hl7.FhirPath.Tests/Tests/AssertParser.cs b/src/Hl7.FhirPath.Tests/Tests/AssertParser.cs
index c102ed9292..71211dbefb 100644
--- a/src/Hl7.FhirPath.Tests/Tests/AssertParser.cs
+++ b/src/Hl7.FhirPath.Tests/Tests/AssertParser.cs
@@ -74,7 +74,7 @@ public static void FailsWith(Parser parser, string input, Action(Parser parser, string input)
{
- SucceedsWith(parser, input, result => Assert.AreEqual(input, (IEnumerable)result));
+ SucceedsWith(parser, input, result => Assert.AreSequenceEqual(input, (IEnumerable)result));
}
public static void SucceedsMatch(Parser parser, string input, T match)
diff --git a/src/Hl7.FhirPath.Tests/Tests/CastTests.cs b/src/Hl7.FhirPath.Tests/Tests/CastTests.cs
index 98dfc11ce4..1214145bf1 100644
--- a/src/Hl7.FhirPath.Tests/Tests/CastTests.cs
+++ b/src/Hl7.FhirPath.Tests/Tests/CastTests.cs
@@ -34,12 +34,12 @@ public void TestUnbox()
{
Assert.IsNull(Typecasts.UnboxTo(emptyColl, typeof(string)));
collection.SequenceEqual(Typecasts.UnboxTo(collection, typeof(IEnumerable)) as IEnumerable);
- 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("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)));
@@ -74,7 +74,7 @@ public void CastComplex()
Assert.IsTrue(Typecasts.CanCastTo(complex, typeof(IEnumerable)));
var result = (IEnumerable)Typecasts.CastTo(complex, typeof(IEnumerable));
- Assert.AreEqual(complex, result.Single());
+ Assert.AreSame(complex, result.Single());
checkCast(complex, complex);
Assert.IsFalse(Typecasts.CanCastTo(collection, typeof(bool)));
Assert.IsFalse(Typecasts.CanCastTo(collection, typeof(bool?)));