|
From: <lh...@us...> - 2010-02-28 10:10:13
|
Revision: 162
http://tmapi.svn.sourceforge.net/tmapi/?rev=162&view=rev
Author: lheuer
Date: 2010-02-28 10:10:07 +0000 (Sun, 28 Feb 2010)
Log Message:
-----------
More illegal variant scope tests
Modified Paths:
--------------
trunk/src/test/java/org/tmapi/core/TestName.java
Modified: trunk/src/test/java/org/tmapi/core/TestName.java
===================================================================
--- trunk/src/test/java/org/tmapi/core/TestName.java 2010-02-28 10:06:38 UTC (rev 161)
+++ trunk/src/test/java/org/tmapi/core/TestName.java 2010-02-28 10:10:07 UTC (rev 162)
@@ -185,6 +185,39 @@
}
}
+ public void testVariantCreationWithLocatorIllegalEmptyScope() {
+ final Name name = createName();
+ try {
+ name.createVariant(createLocator("http://tmapi.org"), Collections.<Topic>emptySet());
+ fail("Creation of a variant with an empty scope is not allowed");
+ }
+ catch (ModelConstraintException ex) {
+ // noop.
+ }
+ }
+
+ public void testVariantCreationWithLocatorIllegalNullScope() {
+ final Name name = createName();
+ try {
+ name.createVariant(createLocator("http://tmapi.org"), (Topic[])null);
+ fail("Creation of a variant with a null scope is not allowed");
+ }
+ catch (ModelConstraintException ex) {
+ // noop.
+ }
+ }
+
+ public void testVariantCreationWithLocatorIllegalEmptyArrayScope() {
+ final Name name = createName();
+ try {
+ name.createVariant(createLocator("http://tmapi.org"));
+ fail("Creation of a variant with an empty scope is not allowed");
+ }
+ catch (ModelConstraintException ex) {
+ // noop.
+ }
+ }
+
public void testVariantCreationWithDataTypeIllegalEmptyScope() {
final Name name = createName();
try {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|