示例#1
0
 @Test
 public void testSetApplicableVersions2() {
   TestCase tc = new TestCase("xml-security", 1, "TESTETS", null);
   tc.addApplicableVersion(1);
   assertTrue(tc.isApplicabletoVersion(1));
   assertFalse(tc.isApplicabletoVersion(0));
 }
示例#2
0
 @Test
 public void testSetApplicableVersions() {
   TestCase tc = new TestCase("xml-security", 0, "TESTETS", null);
   tc.addApplicableVersion(0);
   assertTrue(tc.isApplicabletoVersion(0));
   tc.addApplicableVersion(1);
   assertEquals("{0, 1}", tc.getApplicableVersions());
   assertTrue(tc.isApplicabletoVersion(1));
   assertTrue(tc.isApplicabletoVersion(0));
   tc.addApplicableVersion(4);
   assertEquals("{0, 1, 4}", tc.getApplicableVersions());
   assertTrue(tc.isApplicabletoVersion(1));
   assertTrue(tc.isApplicabletoVersion(0));
   assertTrue(tc.isApplicabletoVersion(4));
   assertFalse(tc.isApplicabletoVersion(5));
 }