Пример #1
0
 @Test
 public void testParseInvalidVerEmpty() {
   assertFalse(
       "Empty version should not have been accepted",
       token.parse(migrationRule, "", gameModeName));
   assertNull("MinVer", migrationRule.getMinVer());
 }
Пример #2
0
 @Test
 public void testParseInvalidVerFormat() {
   String[] badVersions =
       new String[] {"text", "a.b.c", "6.1", "6_0_1", "6.0.1d", "3.rc2", "6.0.1RC2"};
   for (String verString : badVersions) {
     assertFalse(
         "Invalid version " + verString + " should not have been accepted",
         token.parse(migrationRule, verString, gameModeName));
     assertNull("MinVer", migrationRule.getMinVer());
   }
 }
Пример #3
0
 @Test
 public void testParseValidVerNumbers() {
   String[] goodVersions =
       new String[] {"5.17.12", "6.0.0", "6.0.1 RC2", "6.0.1-RC2", "6.01.02", "6.01.02-dev"};
   for (String verString : goodVersions) {
     assertTrue(
         "Valid version " + verString + " should have been accepted",
         token.parse(migrationRule, verString, gameModeName));
     assertEquals("MinVer", verString, migrationRule.getMinVer());
   }
 }
Пример #4
0
 @Test
 public void testParseValidVer() {
   assertTrue(
       "Parse should have been successful", token.parse(migrationRule, "6.01.03", gameModeName));
   assertEquals("MinVer", "6.01.03", migrationRule.getMinVer());
 }