|
From: <lh...@us...> - 2010-02-19 14:31:32
|
Revision: 147
http://tmapi.svn.sourceforge.net/tmapi/?rev=147&view=rev
Author: lheuer
Date: 2010-02-19 14:31:25 +0000 (Fri, 19 Feb 2010)
Log Message:
-----------
Applied patch contributed by Benjamin Bock (illegal variant scope tests)
Modified Paths:
--------------
trunk/CHANGES.txt
trunk/src/test/java/org/tmapi/core/TestName.java
Modified: trunk/CHANGES.txt
===================================================================
--- trunk/CHANGES.txt 2010-02-19 12:53:09 UTC (rev 146)
+++ trunk/CHANGES.txt 2010-02-19 14:31:25 UTC (rev 147)
@@ -4,7 +4,7 @@
TMAPI 2.0.1 - 2010-mm-dd
------------------------
-* Added one more illegal Variant scope test.
+* Added more illegal Variant scope test.
TMAPI 2.0 - 2010-02-06
----------------------
Modified: trunk/src/test/java/org/tmapi/core/TestName.java
===================================================================
--- trunk/src/test/java/org/tmapi/core/TestName.java 2010-02-19 12:53:09 UTC (rev 146)
+++ trunk/src/test/java/org/tmapi/core/TestName.java 2010-02-19 14:31:25 UTC (rev 147)
@@ -184,4 +184,40 @@
// noop.
}
}
+
+ public void testVariantCreationWithDataTypeIllegalEmptyScope() {
+ final Name name = createName();
+ try {
+ final Locator dt = createLocator("http://www.example.org/datatype");
+ name.createVariant("Variant", dt, Collections.<Topic>emptySet());
+ fail("Creation of a variant with an empty scope is not allowed");
+ }
+ catch (ModelConstraintException ex) {
+ // noop.
+ }
+ }
+
+ public void testVariantCreationWithDataTypeIllegalNullScope() {
+ final Name name = createName();
+ try {
+ final Locator dt = createLocator("http://www.example.org/datatype");
+ name.createVariant("Variant", dt, (Topic[])null);
+ fail("Creation of a variant with a null scope is not allowed");
+ }
+ catch (ModelConstraintException ex) {
+ // noop.
+ }
+ }
+
+ public void testVariantCreationWithDataTypeIllegalEmptyArrayScope() {
+ final Name name = createName();
+ try {
+ final Locator dt = createLocator("http://www.example.org/datatype");
+ name.createVariant("Variant", dt);
+ fail("Creation of a variant with an empty scope is not allowed");
+ }
+ catch (ModelConstraintException ex) {
+ // noop.
+ }
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|