-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #614 from FirelyTeam/613-fix-integration-test---sy…
…stemargumentexception-cannot-generate-a-hash-code-for-valuetuple3-arg_paramname_name 613 Fix CqlComparer for tuples
- Loading branch information
Showing
35 changed files
with
438 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
using System; | ||
using Hl7.Cql.Primitives; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace CoreTests.Primitives; | ||
|
||
[TestClass] | ||
public class TypeExtensionsTests | ||
{ | ||
[TestMethod] | ||
public void IsCqlInterval_ShouldReturnTrueAndSetElementType_WhenTypeIsCqlInterval() | ||
{ | ||
// Arrange | ||
Type type = typeof(CqlInterval<int>); | ||
Type elementType; | ||
|
||
// Act | ||
bool result = type.IsCqlInterval(out elementType); | ||
|
||
// Assert | ||
Assert.IsTrue(result); | ||
Assert.AreEqual(typeof(int), elementType); | ||
} | ||
|
||
[TestMethod] | ||
public void IsCqlInterval_ShouldReturnFalseAndSetElementTypeToNull_WhenTypeIsNotCqlInterval() | ||
{ | ||
// Arrange | ||
Type type = typeof(string); | ||
Type elementType; | ||
|
||
// Act | ||
bool result = type.IsCqlInterval(out elementType); | ||
|
||
// Assert | ||
Assert.IsFalse(result); | ||
Assert.IsNull(elementType); | ||
} | ||
|
||
[TestMethod] | ||
public void IsCqlValueTuple_ShouldReturnTrue_WhenTypeIsCqlValueTuple() | ||
{ | ||
// Arrange | ||
Type type = typeof(ValueTuple<CqlTupleMetadata, int>); | ||
|
||
// Act | ||
bool result = type.IsCqlValueTuple(); | ||
|
||
// Assert | ||
Assert.IsTrue(result); | ||
} | ||
|
||
[TestMethod] | ||
public void IsCqlValueTuple_ShouldReturnFalse_WhenTypeIsNotCqlValueTuple() | ||
{ | ||
// Arrange | ||
Type type = typeof(string); | ||
|
||
// Act | ||
bool result = type.IsCqlValueTuple(); | ||
|
||
// Assert | ||
Assert.IsFalse(result); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.