Package apoc.util
Class TestUtil
java.lang.Object
apoc.util.TestUtil
- Since:
- 26.02.16
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TassertDuration(org.hamcrest.Matcher<? super Long> matcher, Supplier<T> function) static voidassertError(Exception e, String errorMessage, Class<? extends Exception> exceptionType, String apocProcedure) static longstatic longstatic <T> List<T>firstColumn(org.neo4j.graphdb.GraphDatabaseService db, String cypher) static URLgetUrlFileName(String filename) static booleanstatic voidignoreException(Runnable runnable, Class<? extends Throwable>... causes) static booleanstatic voidstatic StringreadFileToString(File file) static StringreadFileToString(File file, Charset charset) static voidregisterProcedure(org.neo4j.graphdb.GraphDatabaseService db, Class<?>... procedures) static <T> TsingleResultFirstColumn(org.neo4j.graphdb.GraphDatabaseService db, String cypher) static <T> TsingleResultFirstColumn(org.neo4j.graphdb.GraphDatabaseService db, String cypher, Map<String, Object> params) static voidtestCall(org.neo4j.graphdb.GraphDatabaseService db, String call, Consumer<Map<String, Object>> consumer) static voidtestCall(org.neo4j.graphdb.GraphDatabaseService db, String call, Map<String, Object> params, Consumer<Map<String, Object>> consumer) static voidtestCallAssertions(org.neo4j.graphdb.Result res, Consumer<Map<String, Object>> consumer) static voidtestCallCount(org.neo4j.graphdb.GraphDatabaseService db, String call, int expected) static voidtestCallCount(org.neo4j.graphdb.GraphDatabaseService db, String call, Map<String, Object> params, int expected) static voidtestCallCountEventually(org.neo4j.graphdb.GraphDatabaseService db, String call, int expected, long timeout) static voidtestCallCountEventually(org.neo4j.graphdb.GraphDatabaseService db, String call, Map<String, Object> params, int expected, long timeout) static voidtestCallEmpty(org.neo4j.graphdb.GraphDatabaseService db, String call, Map<String, Object> params) static voidtestCallEventually(org.neo4j.graphdb.GraphDatabaseService db, String call, Consumer<Map<String, Object>> consumer, long timeout) static voidtestCallEventually(org.neo4j.graphdb.GraphDatabaseService db, String call, Map<String, Object> params, Consumer<Map<String, Object>> consumer, long timeout) static voidstatic voidtestResult(org.neo4j.graphdb.GraphDatabaseService db, String call, Consumer<org.neo4j.graphdb.Result> resultConsumer) static voidtestResult(org.neo4j.graphdb.GraphDatabaseService db, String call, Map<String, Object> params, Consumer<org.neo4j.graphdb.Result> resultConsumer) static voidwaitDbsAvailable(long timeout, org.neo4j.graphdb.GraphDatabaseService... dbs) static voidwaitDbsAvailable(org.neo4j.graphdb.GraphDatabaseService... dbs)
-
Constructor Details
-
TestUtil
public TestUtil()
-
-
Method Details
-
testCall
-
testCall
-
testCallCountEventually
public static void testCallCountEventually(org.neo4j.graphdb.GraphDatabaseService db, String call, int expected, long timeout) -
testCallCountEventually
-
testCallEventually
-
testCallEventually
-
testCallAssertions
-
printFullStackTrace
-
testCallEmpty
-
count
-
count
-
testCallCount
public static void testCallCount(org.neo4j.graphdb.GraphDatabaseService db, String call, int expected) -
testCallCount
-
testFail
-
assertError
-
testResult
-
testResult
-
registerProcedure
public static void registerProcedure(org.neo4j.graphdb.GraphDatabaseService db, Class<?>... procedures) -
hasCauses
-
ignoreException
-
assertDuration
-
isRunningInCI
public static boolean isRunningInCI() -
getUrlFileName
-
readFileToString
-
readFileToString
-
singleResultFirstColumn
public static <T> T singleResultFirstColumn(org.neo4j.graphdb.GraphDatabaseService db, String cypher) -
singleResultFirstColumn
-
firstColumn
-
waitDbsAvailable
public static void waitDbsAvailable(org.neo4j.graphdb.GraphDatabaseService... dbs) -
waitDbsAvailable
public static void waitDbsAvailable(long timeout, org.neo4j.graphdb.GraphDatabaseService... dbs)
-