diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml old mode 100644 new mode 100755 index c3fe5be..1e9a606 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,11 +94,11 @@ jobs: unit-test: runs-on: ubuntu-latest steps: - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '11' + java-version: '17' - uses: actions/setup-dotnet@v3 with: diff --git a/src/Messaging/Common/ArtifactTypes.cs b/src/Messaging/Common/ArtifactTypes.cs index bd1771b..51bccf5 100755 --- a/src/Messaging/Common/ArtifactTypes.cs +++ b/src/Messaging/Common/ArtifactTypes.cs @@ -22,6 +22,7 @@ public static class ArtifactTypes { { ArtifactType.Unset, "Unset" }, { ArtifactType.Folder, "Folders" }, + { ArtifactType.HL7, "HL7 message" }, { ArtifactType.AR, "Autorefract" }, { ArtifactType.ASMT, "Content Assessment Results" }, { ArtifactType.AU, "Audio" }, diff --git a/src/Messaging/Tests/Common/ArtifactTypesTests.cs b/src/Messaging/Tests/Common/ArtifactTypesTests.cs index 9f31b72..deb4d05 100755 --- a/src/Messaging/Tests/Common/ArtifactTypesTests.cs +++ b/src/Messaging/Tests/Common/ArtifactTypesTests.cs @@ -14,6 +14,7 @@ * limitations under the License. */ +using System; using Monai.Deploy.Messaging.Common; using Xunit; @@ -32,5 +33,27 @@ public void ArtifactTypeInvalid_ShouldReturnFalse() { Assert.False(ArtifactTypes.Validate("false")); } + + [Fact] + public void ArtifactTypeNull_ShouldReturnFalse() + { + Assert.False(ArtifactTypes.Validate(null)); + } + + [Fact] + public void ArtifactTypes_Should_Contain_All() + { + foreach (var artifactType in Enum.GetValues(typeof(ArtifactType))) + { + Assert.True(ArtifactTypes.ListOfModularity.ContainsKey((ArtifactType)artifactType)); + } + } + + [Fact] + public void ArtifactTypes_Should_Contain_Same_Count() + { + Assert.Equal(ArtifactTypes.ListOfModularity.Count, Enum.GetValues(typeof(ArtifactType)).Length); + } + } }