diff --git a/src/test/java/com/prowidesoftware/swift/io/parser/SwiftParserTest.java b/src/test/java/com/prowidesoftware/swift/io/parser/SwiftParserTest.java index 8a90ec53b..f2a971667 100644 --- a/src/test/java/com/prowidesoftware/swift/io/parser/SwiftParserTest.java +++ b/src/test/java/com/prowidesoftware/swift/io/parser/SwiftParserTest.java @@ -54,14 +54,6 @@ public void test103_1() throws IOException { SwiftMessage m = new SwiftParser(messageToParse).message(); - // get a simple value tag - @SuppressWarnings("unused") - String val32a = m.getBlock3().getTagValue("32A"); - - // get a repeated value tag - @SuppressWarnings("unused") - String[] list71 = m.getBlock3().getTagValues("71F"); - assertEquals("103", m.getType()); // check b1 diff --git a/src/test/java/com/prowidesoftware/swift/io/writer/XMLWriterVisitorTest.java b/src/test/java/com/prowidesoftware/swift/io/writer/XMLWriterVisitorTest.java index 5649882ac..1c25e3c0c 100644 --- a/src/test/java/com/prowidesoftware/swift/io/writer/XMLWriterVisitorTest.java +++ b/src/test/java/com/prowidesoftware/swift/io/writer/XMLWriterVisitorTest.java @@ -53,10 +53,6 @@ public void setUp() { @SuppressWarnings("unused") private String getResult() { - return this.getResult(""); - } - - private String getResult(String testName) { msg.visit(visitor); return this.io.toString(); } @@ -69,7 +65,7 @@ public void testEmpty() { msg.setBlock4(null); msg.setBlock5(null); - assertXmlEqual("", getResult("testEmpty")); + assertXmlEqual("", getResult()); } @Test @@ -86,7 +82,7 @@ public void testEmptyBlocks() { msg.setBlock5(new SwiftBlock5()); String xml = "\n\n\n\n\n"; - assertXmlEqual(xml, getResult("testEmptyBlocks")); + assertXmlEqual(xml, getResult()); } @Test @@ -106,7 +102,7 @@ public void testWithTags() { b4.append(new Tag("t1:v1")); msg.setBlock1(b1); msg.setBlock4(b4); - assertXmlEqual(xml, getResult("testWithTags")); + assertXmlEqual(xml, getResult()); } @Test @@ -120,7 +116,7 @@ public void testBug1539324_1() { msg.setBlock2(b2); String xml = "\n" + Constants.B1_DATA_XML + Constants.B2_INPUT_XML + ""; - assertXmlEqual(xml, getResult("testBug1539324_1")); + assertXmlEqual(xml, getResult()); } @Test @@ -149,7 +145,7 @@ public void testBug1539324_2() { + "\n\n" + "\n\n" + "\n"; - assertXmlEqual(xml, getResult("testBug1539324_2")); + assertXmlEqual(xml, getResult()); } @Test @@ -171,7 +167,7 @@ public void testBug1540294_1() { + "\n\t" + "\n" + ""; - assertXmlEqual(xml, getResult("testBug1540294_1")); + assertXmlEqual(xml, getResult()); } @Test @@ -186,7 +182,7 @@ public void testBlock2Output_1() { msg.setBlock2(b2); String xml = "\n" + Constants.B1_DATA_XML + Constants.B2_OUTPUT_XML + ""; - assertXmlEqual(xml, getResult("testBlock2Output_1")); + assertXmlEqual(xml, getResult()); } @Test @@ -198,7 +194,7 @@ public void testBlock2Output() { msg.setBlock2(b2); String xml = "\n" + Constants.B2_OUTPUT_XML + ""; - String got = getResult("testBlock2Output"); + String got = getResult(); assertXmlEqual(xml, got); } @@ -216,7 +212,7 @@ public void testTagSerialization() { + "\n\t" + "\n" + ""; - assertXmlEqual(xml, getResult("testTagSerialization")); + assertXmlEqual(xml, getResult()); } @Test @@ -235,7 +231,7 @@ public void testFieldSerialization() { + "\n\t" + "\n" + ""; - assertXmlEqual(xml, getResult("testFieldSerialization")); + assertXmlEqual(xml, getResult()); } @Test @@ -256,6 +252,6 @@ public void testWithTags_asField() { msg.setBlock1(b1); msg.setBlock4(b4); this.visitor = new XMLWriterVisitor(this.io, true); - assertXmlEqual(xml, getResult("testWithTags")); + assertXmlEqual(xml, getResult()); } } diff --git a/src/test/java/com/prowidesoftware/swift/model/UnparsedTextListTest.java b/src/test/java/com/prowidesoftware/swift/model/UnparsedTextListTest.java index a8f0b40c0..9cb43f69a 100644 --- a/src/test/java/com/prowidesoftware/swift/model/UnparsedTextListTest.java +++ b/src/test/java/com/prowidesoftware/swift/model/UnparsedTextListTest.java @@ -174,10 +174,7 @@ public void test_bug2822350() throws IOException { SwiftMessage msg = SwiftMessage.parse(sb.toString()); - @SuppressWarnings("unused") - SwiftMessage m2 = SwiftMessage.parse(msg.getUnparsedTexts().getText(0)); - - @SuppressWarnings("unused") - SwiftMessage m3 = SwiftMessage.parse(msg.getUnparsedTexts().getText(1)); + assertNotNull(SwiftMessage.parse(msg.getUnparsedTexts().getText(0))); + assertNotNull(SwiftMessage.parse(msg.getUnparsedTexts().getText(1))); } }