-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a sample test case #9
Comments
Hi @Brazo, thanks for the feedback. I will write some test cases |
Ups wrong button :) |
Thanks for providing this plugin. When using the same test provided by @Brazo,i am getting a nullexception below. Anyideas on what could be wrong? java.lang.NullPointerException Code: Update: Thanks, |
Ups okay i will try to check this at the weekend |
I found a simple solution to enable us to write unit test. The test will take long tho because it require starting the application. It is not a perfect solution because the test will break if simply the application break(because it need to start the app to enable us to use the plugin), which make the test not isolated. So basically the test class need to extends play.test.WithApplication
|
Woaaah cool one @mirahmz thx a lot :) |
Hello guys,
thanks a lot for providing this neo4j plugin. It saves a lot of time configuring play correctly.
One thing I am missing is a sample test case. Could you provide a sample test case for the Galaxy example? Something simple that checks Neo4JServiceProvider.get() actually returns a non-null Neo4jServiceProvider, e.g. a non-null galaxyService?
This worked for me using your plugin:
@test
public void serviceIsCorrectlyRegistered() {
running(fakeApplication(), new Runnable() {
public void run() {
Neo4JServiceProvider nsp = Neo4JServiceProvider.get();
assertNotNull("Neo4jService is not correctly wired by Spring", nsp);
GalaxyService ms = nsp.galaxyService;
assertNotNull("GalaxyService is not correctly wired by Spring", ms);
} });
}
Thanks
Patrick
The text was updated successfully, but these errors were encountered: