From bedae1635079cb161e0594ae202a00f33983126d Mon Sep 17 00:00:00 2001 From: Eamonn Maguire Date: Mon, 20 Jan 2014 13:49:50 +0000 Subject: [PATCH] Inverted the logic - don't know how I did that. Anyway, fixed now. And added a test. --- .../io/importisa/InvestigationImport.java | 3 ++- .../utils/StringProcessingTest.java | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 src/test/java/org/isatools/isacreator/utils/StringProcessingTest.java diff --git a/src/main/java/org/isatools/isacreator/io/importisa/InvestigationImport.java b/src/main/java/org/isatools/isacreator/io/importisa/InvestigationImport.java index 9fa1a006..5592dbf6 100644 --- a/src/main/java/org/isatools/isacreator/io/importisa/InvestigationImport.java +++ b/src/main/java/org/isatools/isacreator/io/importisa/InvestigationImport.java @@ -127,9 +127,10 @@ public Pair()); } diff --git a/src/test/java/org/isatools/isacreator/utils/StringProcessingTest.java b/src/test/java/org/isatools/isacreator/utils/StringProcessingTest.java new file mode 100644 index 00000000..f2406b38 --- /dev/null +++ b/src/test/java/org/isatools/isacreator/utils/StringProcessingTest.java @@ -0,0 +1,23 @@ +package org.isatools.isacreator.utils; + +import org.junit.Test; + +import static junit.framework.Assert.assertEquals; + +/** + * Created with IntelliJ IDEA. + * User: eamonnmaguire + * Date: 20/01/2014 + * Time: 13:41 + * To change this template use File | Settings | File Templates. + */ +public class StringProcessingTest { + + @Test + public void testSpaceRemovalInQualifier() { + String comment = "Comment [Technical Validation]"; + comment = StringProcessing.removeSpaceFromQualifiedField(comment); + System.out.println(comment); + assertEquals("Comment should have no spaces...", comment, "Comment[Technical Validation]"); + } +}