assertTrue(ValidationUtil.checkForVersion(version));
}
- final String[] invalidedVersions = {"", "0.0.0", "36.1.1", "0.36.1", "111.111.111", "1.0", ".1", "0.1"};
+ final String[] invalidedVersions = {"", "0.0.0", "111.111.111111" };
for (String version : invalidedVersions) {
assertFalse(ValidationUtil.checkForVersion(version));
}
}
+ /**
+ * Test {@link ValidationUtil#checkForDynamicBoxId(String value)}
+ *
+ * @throws Exception in case of failure in test
+ *
+ * @see {@link ValidationUtil#checkForDynamicBoxId(String value)}
+ */
+ @Test
+ public void test_checkForDynamicBoxId() throws Exception {
+ final String[] validedIDS = { "1wfV7ZwO6r.test.test", "1wfV7ZwO6r.test.111", "1wfV7ZwO6r.test.test2222" };
+ for ( String id : validedIDS ) {
+ assertTrue( ValidationUtil.checkForDynamicBoxId( id ) );
+ }
+
+ final String[] invalidedIDS = { "", "1wfV7ZwO6r.test.-1", "1wfV7ZwO6r.test.!test", "1wfV7ZwO6r.test.test test", "1wfV7ZwO6r.test.test!#", "1wfV7ZwO6r." };
+ for ( String id : invalidedIDS ) {
+ assertFalse( ValidationUtil.checkForDynamicBoxId( id ) );
+ }
+ }
+
}