diff --git a/waltz-service/src/test/java/org/finos/waltz/service/measurable_rating/BulkMeasurableRatingItemParserTest.java b/waltz-service/src/test/java/org/finos/waltz/service/measurable_rating/BulkMeasurableRatingItemParserTest.java index 27b8ef21d3..dd90c54b51 100644 --- a/waltz-service/src/test/java/org/finos/waltz/service/measurable_rating/BulkMeasurableRatingItemParserTest.java +++ b/waltz-service/src/test/java/org/finos/waltz/service/measurable_rating/BulkMeasurableRatingItemParserTest.java @@ -3,15 +3,16 @@ import org.finos.waltz.common.SetUtilities; import org.finos.waltz.model.bulk_upload.measurable_rating.BulkMeasurableRatingItem; import org.finos.waltz.model.bulk_upload.measurable_rating.BulkMeasurableRatingParseResult; -import org.finos.waltz.model.bulk_upload.taxonomy.BulkTaxonomyParseResult; -import org.finos.waltz.service.taxonomy_management.BulkTaxonomyItemParser; import org.junit.jupiter.api.Test; import java.util.List; import java.util.Set; import static org.finos.waltz.common.IOUtilities.readAsString; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; public class BulkMeasurableRatingItemParserTest { @@ -22,7 +23,7 @@ void simpleTSV() { BulkMeasurableRatingParseResult result = parser.parse(readTestFile("test-measurable-rating-items.tsv"), BulkMeasurableItemParser.InputFormat.TSV); assertNull(result.error()); assertEquals(3, result.parsedItems().size()); - assertNarIds(result.parsedItems(), "109235-1", "109235-1", "324234-1"); + assertNarIds(result.parsedItems(), "109-1", "109-1", "324-1"); } @Test @@ -30,7 +31,7 @@ void simpleCSV() { BulkMeasurableRatingParseResult result = parser.parse(readTestFile("test-measurable-rating-items.csv"), BulkMeasurableItemParser.InputFormat.CSV); assertNull(result.error()); assertEquals(3, result.parsedItems().size()); - assertNarIds(result.parsedItems(), "109235-1", "109235-1", "324234-1"); + assertNarIds(result.parsedItems(), "109-1", "109-1", "324-1"); } @Test @@ -38,7 +39,7 @@ void simpleJSON() { BulkMeasurableRatingParseResult result = parser.parse(readTestFile("test-measurable-rating-items.json"), BulkMeasurableItemParser.InputFormat.JSON); assertNull(result.error()); assertEquals(3, result.parsedItems().size()); - assertNarIds(result.parsedItems(), "109235-1", "109235-1", "324234-1"); + assertNarIds(result.parsedItems(), "109-1", "109-1", "324-1"); } private void assertNarIds(List parsedItems, String... resultNarIds) { @@ -73,14 +74,14 @@ void parseFailsIfGivenBlanks() { void parseIgnoresEmptyLines() { BulkMeasurableRatingParseResult result = parser.parse(readTestFile("test-measurable-rating-items-with-blanks.tsv"), BulkMeasurableItemParser.InputFormat.TSV); assertEquals(3, result.parsedItems().size()); - assertNarIds(result.parsedItems(), "109235-1", "109235-1", "324234-1"); + assertNarIds(result.parsedItems(), "109-1", "109-1", "324-1"); } @Test void parseIgnoresCommentedLines() { BulkMeasurableRatingParseResult result = parser.parse(readTestFile("test-measurable-rating-items-with-commented-lines.csv"), BulkMeasurableItemParser.InputFormat.CSV); assertEquals(2, result.parsedItems().size()); - assertNarIds(result.parsedItems(), "109235-1", "324234-1"); + assertNarIds(result.parsedItems(), "109-1", "324-1"); } private void expectEmptyError(BulkMeasurableRatingParseResult result) { diff --git a/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items-with-blanks.tsv b/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items-with-blanks.tsv index 92fdc3194f..d66c579c5f 100644 --- a/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items-with-blanks.tsv +++ b/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items-with-blanks.tsv @@ -1,6 +1,6 @@ assetCode taxonomy_external_id ratingCode isPrimary comment -109235-1 CT-001 A TRUE comment +109-1 CT-001 A TRUE comment -109235-1 CT-001 A FALSE comment -324234-1 CT-003 A FALSE comment \ No newline at end of file +109-1 CT-001 A FALSE comment +324-1 CT-003 A FALSE comment \ No newline at end of file diff --git a/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items-with-commented-lines.csv b/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items-with-commented-lines.csv index beafd991a9..0f57614d67 100644 --- a/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items-with-commented-lines.csv +++ b/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items-with-commented-lines.csv @@ -1,6 +1,6 @@ assetCode, taxonomy_external_id, ratingCode, isPrimary, comment -#109235-1 CT-001 A TRUE comment +#109-1 CT-001 A TRUE comment -109235-1, CT-001, A, FALSE, comment -324234-1, CT-003, A, FALSE, comment \ No newline at end of file +109-1, CT-001, A, FALSE, comment +324-1, CT-003, A, FALSE, comment \ No newline at end of file diff --git a/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items.csv b/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items.csv index fc4204cf76..1425798f9c 100644 --- a/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items.csv +++ b/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items.csv @@ -1,4 +1,4 @@ assetCode, taxonomyExternalId, ratingCode, isPrimary, comment -109235-1, CT-001, A, TRUE, comment -109235-1, CT-001, A, FALSE, comment -324234-1, CT-003, A, FALSE, comment +109-1, CT-001, A, TRUE, comment +109-1, CT-001, A, FALSE, comment +324-1, CT-003, A, FALSE, comment diff --git a/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items.json b/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items.json index f85ea6844a..19031f45df 100644 --- a/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items.json +++ b/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items.json @@ -1,20 +1,20 @@ [ { - "assetCode": "109235-1", + "assetCode": "109-1", "taxonomyExternalId": "CT-001", "ratingCode": "A", "isPrimary": "TRUE", "comment": "comment" }, { - "assetCode": "109235-1", + "assetCode": "109-1", "taxonomyExternalId": "CT-001", "ratingCode": "A", "isPrimary": "FALSE", "comment": "comment" }, { - "assetCode": "324234-1", + "assetCode": "324-1", "taxonomyExternalId": "CT-003", "ratingCode": "A", "isPrimary": "FALSE", diff --git a/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items.tsv b/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items.tsv index d33e9f435f..ca21ccefbc 100644 --- a/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items.tsv +++ b/waltz-service/src/test/resources/org/finos/waltz/service/measurable_rating/test-measurable-rating-items.tsv @@ -1,4 +1,4 @@ assetCode taxonomyExternalId ratingCode isPrimary comment -109235-1 CT-001 A TRUE comment -109235-1 CT-001 A FALSE comment -324234-1 CT-003 A FALSE comment +109-1 CT-001 A TRUE comment +109-1 CT-001 A FALSE comment +324-1 CT-003 A FALSE comment