javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/utils/AttributeValidatorTest.java
changeset 76 4ad59aaee882
parent 21 2a9601315dfc
child 83 26b2b12093af
--- a/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/utils/AttributeValidatorTest.java	Thu Sep 02 20:20:40 2010 +0300
+++ b/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/utils/AttributeValidatorTest.java	Fri Sep 17 08:28:21 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -183,16 +183,16 @@
         Hashtable tbl = getTestTbl();
         String attrName = "MIDlet-Version";
         assertValidValue(tbl, attrName, "1");
-        assertValidValue(tbl, attrName, "1."); // OPEN: Is this valid? If we are lenient it is.
+        assertValidValue(tbl, attrName, "1.");
         assertValidValue(tbl, attrName, "1.1");
-        assertValidValue(tbl, attrName, "1.1."); // OPEN: Is this valid? If we are lenient it is.
+        assertValidValue(tbl, attrName, "1.1.");
         assertValidValue(tbl, attrName, "1.1.1");
+        assertValidValue(tbl, attrName, "1.1:1"); // invalid chars are ignored
         assertInvalidValue(tbl, attrName, ""); // invalid, attr is mandatory
         assertInvalidValue(tbl, attrName, " "); // invalid, attr is mandatory
-        assertInvalidValue(tbl, attrName, "1.1:1"); // invalid char
         assertInvalidValue(tbl, attrName, "1.1.1."); // invalid, only three parts allowed
         assertInvalidValue(tbl, attrName, "1.1.1.1"); // invalid, only three parts allowed
-        assertInvalidValue(tbl, attrName, "abc"); // invalid chars
+        assertInvalidValue(tbl, attrName, "abc"); // invalid, version is mandatory
     }
 
     public void testRuntimeExecutionEnvironment()