From f08e900d3539f3e38ed58d0b9aafad9e609fe1b6 Mon Sep 17 00:00:00 2001 From: Nathan Creger Date: Mon, 15 Apr 2024 14:55:08 -0400 Subject: [PATCH] fix tests --- src/test/java/org/kpmp/DataTypeEnumTest.java | 5 ++++- src/test/java/org/kpmp/FullDataTypeEnumTest.java | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/kpmp/DataTypeEnumTest.java b/src/test/java/org/kpmp/DataTypeEnumTest.java index 75d5fe0..9b87d33 100755 --- a/src/test/java/org/kpmp/DataTypeEnumTest.java +++ b/src/test/java/org/kpmp/DataTypeEnumTest.java @@ -4,11 +4,12 @@ import org.junit.Test; + public class DataTypeEnumTest { @Test public void testGetAbbreviation() { - assertEquals(12, DataTypeEnum.values().length); + assertEquals(13, DataTypeEnum.values().length); assertEquals("sn", DataTypeEnum.SINGLE_NUCLEUS.getAbbreviation()); assertEquals("sc", DataTypeEnum.SINGLE_CELL.getAbbreviation()); assertEquals("rt", DataTypeEnum.REGIONAL_TRANSCRIPTOMICS.getAbbreviation()); @@ -17,6 +18,7 @@ public void testGetAbbreviation() { assertEquals("sm", DataTypeEnum.SPATIAL_METABOLOMICS.getAbbreviation()); assertEquals("sng", DataTypeEnum.SPATIAL_NGLYCOMICS.getAbbreviation()); assertEquals("rp", DataTypeEnum.REGIONAL_PROTEOMICS.getAbbreviation()); + assertEquals("imc", DataTypeEnum.IMAGING_MASS_CYTOMETRY.getAbbreviation()); assertEquals("", DataTypeEnum.UNKNOWN.getAbbreviation()); } @@ -30,6 +32,7 @@ public void testFromAbbreviation() { assertEquals(DataTypeEnum.SPATIAL_METABOLOMICS, DataTypeEnum.fromAbbreviation("sm")); assertEquals(DataTypeEnum.SPATIAL_NGLYCOMICS, DataTypeEnum.fromAbbreviation("sng")); assertEquals(DataTypeEnum.REGIONAL_PROTEOMICS, DataTypeEnum.fromAbbreviation("rp")); + assertEquals(DataTypeEnum.IMAGING_MASS_CYTOMETRY, DataTypeEnum.fromAbbreviation("imc")); assertEquals(DataTypeEnum.UNKNOWN, DataTypeEnum.fromAbbreviation("xxx")); assertEquals(DataTypeEnum.UNKNOWN, DataTypeEnum.fromAbbreviation("")); assertEquals(DataTypeEnum.UNKNOWN, DataTypeEnum.fromAbbreviation(null)); diff --git a/src/test/java/org/kpmp/FullDataTypeEnumTest.java b/src/test/java/org/kpmp/FullDataTypeEnumTest.java index 203c958..f27f455 100755 --- a/src/test/java/org/kpmp/FullDataTypeEnumTest.java +++ b/src/test/java/org/kpmp/FullDataTypeEnumTest.java @@ -8,7 +8,7 @@ public class FullDataTypeEnumTest { @Test public void testGetLong() { - assertEquals(12, FullDataTypeEnum.values().length); + assertEquals(13, FullDataTypeEnum.values().length); assertEquals("Single-nucleus RNA-seq (snRNA-seq)", FullDataTypeEnum.SINGLE_NUCLEUS_FULL.getFullName()); assertEquals("Single-cell RNA-seq (scRNA-seq)", FullDataTypeEnum.SINGLE_CELL_FULL.getFullName()); assertEquals("Regional transcriptomics", FullDataTypeEnum.REGIONAL_TRANSCRIPTOMICS_FULL.getFullName()); @@ -17,6 +17,7 @@ public void testGetLong() { assertEquals("Spatial Metabolomics", FullDataTypeEnum.SPATIAL_METABOLOMICS_FULL.getFullName()); assertEquals("Spatial N-glycomics", FullDataTypeEnum.SPATIAL_NGLYCOMICS_FULL.getFullName()); assertEquals("Regional proteomics", FullDataTypeEnum.REGIONAL_PROTEOMICS_FULL.getFullName()); + assertEquals("Imaging Mass Cytometry", FullDataTypeEnum.IMAGING_MASS_CYTOMETRY_FULL.getFullName()); assertEquals("", FullDataTypeEnum.UNKNOWN_FULL.getFullName()); } @@ -29,6 +30,7 @@ public void testFromLong() { assertEquals(FullDataTypeEnum.SPATIAL_LIPIDOMICS_FULL, FullDataTypeEnum.fromLong("Spatial Lipidomics")); assertEquals(FullDataTypeEnum.SPATIAL_METABOLOMICS_FULL, FullDataTypeEnum.fromLong("Spatial Metabolomics")); assertEquals(FullDataTypeEnum.SPATIAL_NGLYCOMICS_FULL, FullDataTypeEnum.fromLong("Spatial N-glycomics")); + assertEquals(FullDataTypeEnum.IMAGING_MASS_CYTOMETRY_FULL, FullDataTypeEnum.fromLong("Imaging Mass Cytometry")); assertEquals(FullDataTypeEnum.UNKNOWN_FULL, FullDataTypeEnum.fromLong("xxx")); assertEquals(FullDataTypeEnum.UNKNOWN_FULL, FullDataTypeEnum.fromLong("")); assertEquals(FullDataTypeEnum.UNKNOWN_FULL, FullDataTypeEnum.fromLong(null));