Thanks for your help,
I found my mistake :)
It has to be: public static junit.framework.Test suite(){
return new JUnit4TestAdapter(SoccerTeamTest.class);
}
Type: Posts; User: degude
Thanks for your help,
I found my mistake :)
It has to be: public static junit.framework.Test suite(){
return new JUnit4TestAdapter(SoccerTeamTest.class);
}
I changed the constructor so that is has no arguments, instead I wrote t.setName("..."); into the @Before ckear() method but now I get:
java.lang.Exception: No runnable methods
No that is my problem.
That is all of my code.
The constructor of SoccerTeam is:
public SoccerTeam(String name) {
this.name = name;
}
My testclass does not have one, do I need one?
This is what I got when I run the test:
SoccerTournament
Soccer.SoccerTeam
initializationError(Soccer.SoccerTeam)
java.lang.Exception: Test class should have exactly one public zero-argument...
Hi
This is my first time using JUnit and somehow this doesn't work. I have a class SoccerTeam and a
testclass SoccerTeamTest. I always get an initialization error so what do I have to change?
...