Package apoc.util

Class TestUtil

java.lang.Object
apoc.util.TestUtil

public class TestUtil extends Object
Since:
26.02.16
  • Constructor Details

    • TestUtil

      public TestUtil()
  • Method Details

    • testCall

      public static void testCall(org.neo4j.graphdb.GraphDatabaseService db, String call, Consumer<Map<String,Object>> consumer)
    • testCall

      public static void testCall(org.neo4j.graphdb.GraphDatabaseService db, String call, Map<String,Object> params, Consumer<Map<String,Object>> consumer)
    • testCallCountEventually

      public static void testCallCountEventually(org.neo4j.graphdb.GraphDatabaseService db, String call, int expected, long timeout)
    • testCallCountEventually

      public static void testCallCountEventually(org.neo4j.graphdb.GraphDatabaseService db, String call, Map<String,Object> params, int expected, long timeout)
    • testCallEventually

      public static void testCallEventually(org.neo4j.graphdb.GraphDatabaseService db, String call, Consumer<Map<String,Object>> consumer, long timeout)
    • testCallEventually

      public static void testCallEventually(org.neo4j.graphdb.GraphDatabaseService db, String call, Map<String,Object> params, Consumer<Map<String,Object>> consumer, long timeout)
    • testCallAssertions

      public static void testCallAssertions(org.neo4j.graphdb.Result res, Consumer<Map<String,Object>> consumer)
    • printFullStackTrace

      public static void printFullStackTrace(Throwable e)
    • testCallEmpty

      public static void testCallEmpty(org.neo4j.graphdb.GraphDatabaseService db, String call, Map<String,Object> params)
    • count

      public static long count(org.neo4j.graphdb.GraphDatabaseService db, String cypher, Map<String,Object> params)
    • count

      public static long count(org.neo4j.graphdb.GraphDatabaseService db, String cypher)
    • testCallCount

      public static void testCallCount(org.neo4j.graphdb.GraphDatabaseService db, String call, int expected)
    • testCallCount

      public static void testCallCount(org.neo4j.graphdb.GraphDatabaseService db, String call, Map<String,Object> params, int expected)
    • testFail

      public static void testFail(org.neo4j.graphdb.GraphDatabaseService db, String call, Class<? extends Exception> t)
    • assertError

      public static void assertError(Exception e, String errorMessage, Class<? extends Exception> exceptionType, String apocProcedure)
    • testResult

      public static void testResult(org.neo4j.graphdb.GraphDatabaseService db, String call, Consumer<org.neo4j.graphdb.Result> resultConsumer)
    • testResult

      public static void testResult(org.neo4j.graphdb.GraphDatabaseService db, String call, Map<String,Object> params, Consumer<org.neo4j.graphdb.Result> resultConsumer)
    • registerProcedure

      public static void registerProcedure(org.neo4j.graphdb.GraphDatabaseService db, Class<?>... procedures)
    • hasCauses

      public static boolean hasCauses(Throwable t, Class<? extends Throwable>... types)
    • ignoreException

      public static void ignoreException(Runnable runnable, Class<? extends Throwable>... causes)
    • assertDuration

      public static <T> T assertDuration(org.hamcrest.Matcher<? super Long> matcher, Supplier<T> function)
    • isRunningInCI

      public static boolean isRunningInCI()
    • getUrlFileName

      public static URL getUrlFileName(String filename)
    • readFileToString

      public static String readFileToString(File file)
    • readFileToString

      public static String readFileToString(File file, Charset charset)
    • singleResultFirstColumn

      public static <T> T singleResultFirstColumn(org.neo4j.graphdb.GraphDatabaseService db, String cypher)
    • singleResultFirstColumn

      public static <T> T singleResultFirstColumn(org.neo4j.graphdb.GraphDatabaseService db, String cypher, Map<String,Object> params)
    • firstColumn

      public static <T> List<T> firstColumn(org.neo4j.graphdb.GraphDatabaseService db, String cypher)
    • waitDbsAvailable

      public static void waitDbsAvailable(org.neo4j.graphdb.GraphDatabaseService... dbs)
    • waitDbsAvailable

      public static void waitDbsAvailable(long timeout, org.neo4j.graphdb.GraphDatabaseService... dbs)