From: tcofoegbu Date: Mon, 1 May 2017 17:08:05 +0000 (+0100) Subject: JAL-2482 unit test for bug fix X-Git-Tag: Release_2_10_2~3^2~117 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=283a308d1e5ac5c94b282cdbaba6015178e53a1a;p=jalview.git JAL-2482 unit test for bug fix --- 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); + } }