Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dert1129 committed Apr 15, 2024
1 parent b064516 commit f08e900
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/test/java/org/kpmp/DataTypeEnumTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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());
}

Expand All @@ -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));
Expand Down
4 changes: 3 additions & 1 deletion src/test/java/org/kpmp/FullDataTypeEnumTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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());
}

Expand All @@ -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));
Expand Down

0 comments on commit f08e900

Please sign in to comment.