Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Annotated all mutative JUnit tests with @Category(Mutative.class).

  • Loading branch information...
commit b7e0a4dbcc44952d57a4999a9b69444fd22f3219 1 parent 55e3d9b
@bendiken bendiken authored
View
24 test/com/dydra/sesame/DydraRepositoryConnectionTest.java
@@ -2,7 +2,9 @@
package com.dydra.sesame;
+import com.dydra.test.*;
import org.junit.*;
+import org.junit.experimental.categories.*;
import static org.junit.Assert.*;
import java.io.IOException;
import java.util.*;
@@ -265,12 +267,12 @@ public void testSeRQLQuery()
query.evaluate(); // throws HTTPQueryEvaluationException (400 Bad Request)
}
- @Test
+ @Test @Category(Mutative.class)
public void testUpdate() throws RepositoryException, MalformedQueryException {
// TODO: connection.prepareUpdate(QueryLanguage.SPARQL, ...)
}
- @Test
+ @Test @Category(Mutative.class)
public void testUpdateWithBindings() throws RepositoryException, MalformedQueryException {
// TODO: connection.prepareUpdate(QueryLanguage.SPARQL, ...)
}
@@ -369,7 +371,7 @@ public void testIsEmpty() throws RepositoryException {
assertFalse(connection.isEmpty());
}
- @Test
+ @Test @Category(Mutative.class)
public void testAutoCommit() throws RepositoryException {
connection.setAutoCommit(true);
assertTrue(connection.isAutoCommit());
@@ -378,27 +380,27 @@ public void testAutoCommit() throws RepositoryException {
assertFalse(connection.isAutoCommit());
}
- @Test
+ @Test @Category(Mutative.class)
public void testCommit() throws RepositoryException {
// TODO: connection.commit()
}
- @Test
+ @Test @Category(Mutative.class)
public void testRollback() throws RepositoryException {
// TODO: connection.rollback()
}
- @Test
+ @Test @Category(Mutative.class)
public void testAdd() throws IOException, RDFParseException, RepositoryException {
// TODO: connection.add()
}
- @Test
+ @Test @Category(Mutative.class)
public void testRemove() throws RepositoryException {
// TODO: connection.remove()
}
- @Test
+ @Test @Category(Mutative.class)
public void testClear() throws RepositoryException {
// TODO: connection.clear()
}
@@ -421,17 +423,17 @@ public void testGetNamespace() throws RepositoryException {
assertEquals(RDF.NAMESPACE, namespace);
}
- @Test
+ @Test @Category(Mutative.class)
public void testSetNamespace() throws RepositoryException {
// TODO: connection.setNamespace("rdf", RDF.NAMESPACE);
}
- @Test
+ @Test @Category(Mutative.class)
public void testRemoveNamespace() throws RepositoryException {
// TODO: connection.removeNamespace("rdf");
}
- @Test
+ @Test @Category(Mutative.class)
public void testClearNamespaces() throws RepositoryException {
// TODO: connection.clearNamespaces();
}
View
6 test/com/dydra/sesame/DydraRepositoryManagerTest.java
@@ -2,7 +2,9 @@
package com.dydra.sesame;
+import com.dydra.test.*;
import org.junit.*;
+import org.junit.experimental.categories.*;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
import java.util.*;
@@ -45,7 +47,7 @@ public void tearDown() {
this.manager = null;
}
- @Test(expected=RepositoryReadOnlyException.class)
+ @Test(expected=RepositoryReadOnlyException.class) @Category(Mutative.class)
public void testAddRepositoryConfig()
throws RepositoryException, RepositoryConfigException {
manager.addRepositoryConfig(new RepositoryConfig(this.repositoryName));
@@ -127,7 +129,7 @@ public void testHasRepositoryConfig()
assertFalse(manager.hasRepositoryConfig(UUID.randomUUID().toString()));
}
- @Test(expected=RepositoryReadOnlyException.class)
+ @Test(expected=RepositoryReadOnlyException.class) @Category(Mutative.class)
public void testRemoveRepositoryConfig()
throws RepositoryException, RepositoryConfigException {
manager.removeRepositoryConfig(this.repositoryName);
View
1  test/com/dydra/sesame/DydraRepositoryTest.java
@@ -2,6 +2,7 @@
package com.dydra.sesame;
+import com.dydra.test.*;
import org.junit.*;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
View
8 test/com/dydra/test/Mutative.java
@@ -0,0 +1,8 @@
+/* This is free and unencumbered software released into the public domain. */
+
+package com.dydra.test;
+
+/**
+ * Marker interface for mutative JUnit tests.
+ */
+public interface Mutative {}
Please sign in to comment.
Something went wrong with that request. Please try again.