|
A robust starter web application to ease Java webapp development. Home | Tutorials | Demos | Issues |
|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
BaseControllerTestCase, org.appfuse.webapp cannot be resolved (AppFuse 2 tutorial woes)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. |
|
|
Re: BaseControllerTestCase, org.appfuse.webapp cannot be resolved (AppFuse 2 tutorial woes)Do you have test methods in your class that start with "public void testXXX"?
Matt On Mon, Jun 30, 2008 at 9:56 AM, revda <revda@...> wrote: > > 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. > -- > View this message in context: http://www.nabble.com/BaseControllerTestCase%2C-org.appfuse.webapp-cannot-be-resolved-%28AppFuse-2-tutorial-woes%29-tp18198710s2369p18198710.html > Sent from the AppFuse - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free Forum Powered by Nabble | Forum Help |
