From 283a308d1e5ac5c94b282cdbaba6015178e53a1a Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Mon, 1 May 2017 18:08:05 +0100 Subject: [PATCH] JAL-2482 unit test for bug fix --- test/jalview/ws/sifts/SiftsClientTest.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/jalview/ws/sifts/SiftsClientTest.java b/test/jalview/ws/sifts/SiftsClientTest.java index 7f8adc9..b92766e 100644 --- a/test/jalview/ws/sifts/SiftsClientTest.java +++ b/test/jalview/ws/sifts/SiftsClientTest.java @@ -514,4 +514,22 @@ groups = { "Network" }, Assert.assertNull(entityP); } + + @Test(groups = { "Network" }) + public void getLeadingIntegerFromString() + { + Assert.assertEquals( + SiftsClient.getLeadingIntegerValue("1234abcd", -1), 1234); + Assert.assertEquals( + SiftsClient.getLeadingIntegerValue("1234", -1), + 1234); + Assert.assertEquals( + SiftsClient.getLeadingIntegerValue("abcd", -1), -1); + Assert.assertEquals( + SiftsClient.getLeadingIntegerValue("abcd1234", -1), -1); + Assert.assertEquals( + SiftsClient.getLeadingIntegerValue("None", -1), -1); + Assert.assertEquals( + SiftsClient.getLeadingIntegerValue("Null", -1), -1); + } } -- 1.7.10.2