Permalink
Browse files

Renamed tests so maven picks them up

Removed unnecessary use of JUnitSuite
  • Loading branch information...
1 parent 1759bc5 commit 709ae413109a26eeecbe1a285040cc3d3437bab1 @systay committed Aug 3, 2012
Showing with 28 additions and 31 deletions.
  1. +1 −2 ...t/java/org/neo4j/cypher/javacompat/{JavaExecutionEngineTests.java → JavaExecutionEngineTest.java}
  2. +2 −1 cypher/src/test/scala/org/neo4j/cypher/ColumnNameTest.scala
  3. +1 −1 ...est/scala/org/neo4j/cypher/{CreateUniqueAcceptanceTests.scala → CreateUniqueAcceptanceTest.scala}
  4. +4 −4 cypher/src/test/scala/org/neo4j/cypher/CypherParserTest.scala
  5. +1 −1 cypher/src/test/scala/org/neo4j/cypher/{EagerVsLazyTests.scala → EagerVsLazyTest.scala}
  6. +2 −1 cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineHelper.scala
  7. +2 −1 cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineTest.scala
  8. +3 −2 cypher/src/test/scala/org/neo4j/cypher/GraphDatabaseTestBase.scala
  9. +1 −1 .../src/test/scala/org/neo4j/cypher/{MutatingIntegrationTests.scala → MutatingIntegrationTest.scala}
  10. +1 −1 cypher/src/test/scala/org/neo4j/cypher/{PathImplTests.scala → PathImplTest.scala}
  11. +1 −2 cypher/src/test/scala/org/neo4j/cypher/SyntaxExceptionTest.scala
  12. +1 −1 ...est/scala/org/neo4j/cypher/internal/commands/{PropertyValueTests.scala → PropertyValueTest.scala}
  13. +1 −1 .../test/scala/org/neo4j/cypher/internal/commands/{SeqPredicateTests.scala → SeqPredicateTest.scala}
  14. +1 −2 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/ColumnFilterPipeTest.scala
  15. +1 −2 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/EagerAggregationPipeTest.scala
  16. +1 −2 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/OrderedAggregationPipeTest.scala
  17. +1 −2 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/SortPipeTest.scala
  18. +1 −2 cypher/src/test/scala/org/neo4j/cypher/internal/pipes/matching/PatternRelationshipTest.scala
  19. +2 −2 cypher/src/test/scala/org/neo4j/cypher/internal/symbols/SymbolTableTest.scala
@@ -42,9 +42,8 @@
import static org.neo4j.helpers.collection.IteratorUtil.asIterable;
import static org.neo4j.helpers.collection.IteratorUtil.count;
-public class JavaExecutionEngineTests
+public class JavaExecutionEngineTest
{
-
private GraphDatabaseService db;
private ExecutionEngine engine;
private Node andreasNode;
@@ -20,8 +20,9 @@
package org.neo4j.cypher
import org.junit.Test
+import org.scalatest.Assertions
-class ColumnNameTest extends ExecutionEngineHelper {
+class ColumnNameTest extends ExecutionEngineHelper with Assertions {
@Test def shouldKeepUsedExpression1() {
val result = parseAndExecute("start n=node(0) return cOuNt( * )")
assert(result.columns === List("cOuNt( * )"))
@@ -25,7 +25,7 @@ import collection.JavaConverters._
import org.scalatest.Assertions
import org.neo4j.graphdb.{Node, Relationship}
-class CreateUniqueAcceptanceTests extends ExecutionEngineHelper with Assertions with StatisticsChecker {
+class CreateUniqueAcceptanceTest extends ExecutionEngineHelper with Assertions with StatisticsChecker {
val stats = QueryStatistics.empty
@@ -24,13 +24,12 @@ import internal.mutation._
import internal.parser.v1_6.ConsoleCypherParser
import org.junit.Assert._
import org.neo4j.graphdb.Direction
-import org.scalatest.junit.JUnitSuite
import org.junit.Test
import org.junit.Ignore
import org.scalatest.Assertions
import org.hamcrest.CoreMatchers.equalTo
-class CypherParserTest extends JUnitSuite with Assertions {
+class CypherParserTest extends Assertions {
@Test def shouldParseEasiestPossibleQuery() {
testAll("start s = NODE(1) return s",
Query.
@@ -1894,7 +1893,6 @@ create a-[r:REL]->b
testFrom_1_8("start a=node(1), b=node(2) create a-[r1:KNOWS]->()<-[r2:LOVES]->b", q)
}
-
@Test def create_and_assign_to_path_identifier() {
testFrom_1_8(
"create p = a-[r:KNOWS]->() return p",
@@ -1931,6 +1929,9 @@ foreach(x in [1,2,3] :
returns(ReturnItem(Entity("p"), "p")))
}
+ @Test def with_is_not_always_neccessary() {
+ }
+
def test_1_8(query: String, expectedQuery: Query) {
testQuery(None, query, expectedQuery)
testQuery(None, query + ";", expectedQuery)
@@ -1966,7 +1967,6 @@ foreach(x in [1,2,3] :
def testQuery(version: Option[String], query: String, expectedQuery: Query) {
val parser = new CypherParser()
-
val (qWithVer, message) = version match {
case None => (query, "Using the default parser")
case Some(ver) => ("cypher %s %s".format(ver, query), "Using parser version " + ver)
@@ -26,7 +26,7 @@ import org.neo4j.graphdb.event.{KernelEventHandler, TransactionEventHandler}
import org.junit.{Test, Before}
import org.junit.Assert._
-class EagerVsLazyTests extends Assertions {
+class EagerVsLazyTest extends Assertions {
var graph: SnitchGraphDatabaseService = _
@Test
@@ -21,9 +21,10 @@ package org.neo4j.cypher
import internal.commands.Query
import org.junit.Before
+import org.scalatest.Assertions
-trait ExecutionEngineHelper extends GraphDatabaseTestBase {
+trait ExecutionEngineHelper extends GraphDatabaseTestBase with Assertions {
var engine: ExecutionEngine = null
@@ -28,8 +28,9 @@ import org.neo4j.graphdb.{Path, Relationship, Direction, Node}
import org.junit.{Ignore, Test}
import org.neo4j.index.lucene.ValueContext
import org.neo4j.test.ImpermanentGraphDatabase
+import org.scalatest.Assertions
-class ExecutionEngineTest extends ExecutionEngineHelper {
+class ExecutionEngineTest extends ExecutionEngineHelper with Assertions {
@Test def shouldGetReferenceNode() {
val query = Query.
@@ -20,14 +20,15 @@
package org.neo4j.cypher
import org.junit.{After, Before}
+import org.junit.Assert
import scala.collection.JavaConverters._
-import org.scalatest.junit.JUnitSuite
import collection.Map
import org.neo4j.graphdb._
import org.neo4j.test.ImpermanentGraphDatabase
import org.neo4j.kernel.GraphDatabaseAPI
-class GraphDatabaseTestBase extends JUnitSuite {
+
+class GraphDatabaseTestBase {
var graph: GraphDatabaseAPI with Snitch = null
var refNode: Node = null
var nodes: List[Node] = null
@@ -26,7 +26,7 @@ import org.scalatest.Assertions
import org.neo4j.graphdb._
import java.util.HashMap
-class MutatingIntegrationTests extends ExecutionEngineHelper with Assertions with StatisticsChecker {
+class MutatingIntegrationTest extends ExecutionEngineHelper with Assertions with StatisticsChecker {
val stats = QueryStatistics.empty
@@ -26,7 +26,7 @@ import org.neo4j.graphdb._
import org.scalatest.Spec
import scala.collection.JavaConverters._
-class PathImplTests extends Spec {
+class PathImplTest extends Spec {
val typ = DynamicRelationshipType.withName("a")
@@ -19,11 +19,10 @@
*/
package org.neo4j.cypher
-import org.scalatest.junit.JUnitSuite
import org.junit.Assert._
import org.junit.{Test}
-class SyntaxExceptionTest extends JUnitSuite {
+class SyntaxExceptionTest {
def expectError(query: String, expectedError: String) {
val parser = new CypherParser()
try {
@@ -22,7 +22,7 @@ package org.neo4j.cypher.internal.commands
import org.scalatest.Assertions
import org.junit.Test
-class PropertyValueTests extends Assertions {
+class PropertyValueTest extends Assertions {
@Test def nullNodeShouldGiveNullProperty() {
val p = Property("identifier", "property")
@@ -22,7 +22,7 @@ package org.neo4j.cypher.internal.commands
import org.junit.Test
import org.scalatest.Assertions
-class SeqPredicateTests extends Assertions {
+class SeqPredicateTest extends Assertions {
@Test def allStringsBeginWithA() {
val strings = Seq("Andres", "Andres")
val inner = Equals(Literal("Andres"), Entity("x"))
@@ -21,12 +21,11 @@ package org.neo4j.cypher.internal.pipes
import org.junit.Assert
import org.junit.Test
-import org.scalatest.junit.JUnitSuite
import org.neo4j.cypher.internal.commands.{Entity, ReturnItem}
import org.neo4j.cypher.internal.symbols.{Identifier, NodeType, SymbolTable}
import collection.mutable.Map
-class ColumnFilterPipeTest extends JUnitSuite {
+class ColumnFilterPipeTest {
@Test def shouldReturnColumnsFromReturnItems() {
val col = "extractReturnItems"
val returnItems = List(ReturnItem(Entity(col), col))
@@ -24,13 +24,12 @@ import org.junit.Assert._
import org.junit.matchers.JUnitMatchers._
import scala.collection.JavaConverters._
import org.neo4j.cypher.internal.commands._
-import org.scalatest.junit.JUnitSuite
import org.neo4j.cypher.SyntaxException
import org.neo4j.cypher.internal.symbols._
import collection.mutable.Map
import java.lang.{Iterable => JIterable}
-class EagerAggregationPipeTest extends JUnitSuite {
+class EagerAggregationPipeTest {
@Test def shouldReturnColumnsFromReturnItems() {
val source = new FakePipe(List(), createSymbolTableFor("name"))
@@ -24,15 +24,14 @@ import org.junit.Assert._
import org.junit.matchers.JUnitMatchers._
import scala.collection.JavaConverters._
import org.neo4j.cypher.internal.commands._
-import org.scalatest.junit.JUnitSuite
import org.scalatest.Assertions
import org.neo4j.cypher.SyntaxException
import org.neo4j.helpers.ThisShouldNotHappenError
import org.neo4j.cypher.internal.symbols._
import collection.mutable.Map
import java.lang.{Iterable=>JIterable}
-class OrderedAggregationPipeTest extends JUnitSuite with Assertions {
+class OrderedAggregationPipeTest extends Assertions {
@Test def shouldReturnColumnsFromReturnItems() {
val source = new FakePipe(List(), createSymbolTableFor("name"))
@@ -21,12 +21,11 @@ package org.neo4j.cypher.internal.pipes
import org.junit.Test
import org.junit.Assert._
-import org.scalatest.junit.JUnitSuite
import org.neo4j.cypher.internal.commands.{Entity, SortItem}
import org.neo4j.cypher.internal.symbols.{Identifier, SymbolTable}
import collection.mutable.Map
-class SortPipeTest extends JUnitSuite {
+class SortPipeTest {
@Test def emptyInIsEmptyOut() {
val source = new FakePipe(List())
val sortPipe = new SortPipe(source, List(SortItem(Entity("x"), true)))
@@ -19,13 +19,12 @@
*/
package org.neo4j.cypher.internal.pipes.matching
-import org.scalatest.junit.JUnitSuite
import org.scalatest.Assertions
import org.junit.Test
import org.neo4j.graphdb.Direction
import org.neo4j.cypher.internal.commands.True
-class PatternRelationshipTest extends JUnitSuite with Assertions {
+class PatternRelationshipTest extends Assertions {
@Test def returnsTheOtherNode() {
val a = new PatternNode("a")
val b = new PatternNode("b")
@@ -19,11 +19,11 @@
*/
package org.neo4j.cypher.internal.symbols
-import org.scalatest.junit.JUnitSuite
import org.junit.Test
import org.neo4j.cypher.{CypherTypeException, SyntaxException}
+import org.scalatest.Assertions
-class SymbolTableTest extends JUnitSuite {
+class SymbolTableTest extends Assertions {
@Test def givenSymbolTableWithIdentifierWhenAskForExistingThenReturnIdentifier() {
val symbols = new SymbolTable(Identifier("x", AnyType()))
symbols.assertHas(Identifier("x", AnyType()))

0 comments on commit 709ae41

Please sign in to comment.