There is also a programmatic API:
http://neo4j.com/docs/2.3.6/server-unmanaged-extensions-testing.html
@Testpublic void testMyExtension() throws Exception
{
// Given
try ( ServerControls server = TestServerBuilders.newInProcessBuilder()
.withExtension( "/myExtension", MyUnmanagedExtension.class )
.newServer() )
{
// When
HTTP.Response response = HTTP.GET( server.httpURI().resolve(
"myExtension" ).toString() );
// Then
assertEquals( 200, response.status() );
}
}
On Tue, Oct 4, 2016 at 10:24 AM, Johan Dindaine <[email protected]>
wrote:
> Thanks Michael,
>
> Actually I thought there were a way to start it programmatically without
> the dependency on Junit as I currently use scalatest. I guess my only
> option would be to find out sometime today how this rule is executed to try
> to do the same directly.
>
> On Monday, 3 October 2016 00:06:10 UTC+1, Michael Hunger wrote:
>>
>> There is neo4j-harness which is exactly what you want for this purpose.
>>
>> Here is an example on how it's used with bolt:
>>
>> https://github.com/neo4j-examples/neo4j-procedure-template/
>> blob/master/src/test/java/example/LegacyFullTextIndexTest.java#L17
>>
>> On Sun, Oct 2, 2016 at 5:04 PM, Johan Dindaine <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> I am at a point where I want to run some tests against services that
>>> make queries using the Java driver using bolt. And I would very much like
>>> to start an embedded server that will process the queries before starting
>>> the test suite.
>>>
>>> I looked over the internet to try to find that but I couldn't and the
>>> current embedded server only work on the file system and therefore do not
>>> use bolt.
>>>
>>> Is there any solution to run my integration test that currently exists?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Neo4j" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.