I am following the AppFuse 2 tutorial but can't get the web stuff to work. Trying to create the SystemUserControllerTest in Eclipse (my class is called com.mycompany.myapp.model.SystemUser, not org.appfuse.tutorial.model.Person, but they're otherwise the same so far), I get 4 errors:
* BaseControllerTestCase cannot be resolved to a type
* The import org.appfuse.webapp cannot be resolved
* The method assertNotNull(Object) is undefined for the type SystemUserControllerTest
* The method assertTrue(boolean) is undefined for the type SystemUserControllerTest
I'm assuming the real problem here is that second line, with the others being caused by the failed import.
'mvn compile' works fine, but 'mvn test -Dtest=SystemUserControllerTest' yields one error, explained in target/surefire-reports/com.mycompany.myapp.webapp.controller.SystemUserControllerTest.txt as:
java.lang.Exception: No runnable methods
at org.junit.internal.runners.MethodValidator.validateInstanceMethods(MethodValidator.java:32)
at org.junit.internal.runners.MethodValidator.validateMethodsForDefaultRunner(MethodValidator.java:43)
at org.junit.internal.runners.JUnit4ClassRunner.validate(JUnit4ClassRunner.java:36)
at org.junit.internal.runners.JUnit4ClassRunner.<init>(JUnit4ClassRunner.java:27)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.junit.internal.requests.ClassRequest.buildRunner(ClassRequest.java:33)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:28)
at org.apache.maven.surefire.junit4.JUnit4TestSet.<init>(JUnit4TestSet.java:45)
[snip]
I found a similar thread here (
http://www.nabble.com/org.appfuse.webapp-classes-don't-seem-to-be-in-classpath-to14164948.html), but that didn't help me.
Any ideas? Thanks.