Search:

Type: Posts; User: degude

Search: Search took 0.40 seconds.

  1. Thread: JUnit problems

    by degude
    Replies
    8
    Views
    3,666

    Re: JUnit problems

    Thanks for your help,
    I found my mistake :)
    It has to be: public static junit.framework.Test suite(){
    return new JUnit4TestAdapter(SoccerTeamTest.class);
    }
  2. Thread: JUnit problems

    by degude
    Replies
    8
    Views
    3,666

    Re: JUnit problems

    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
  3. Thread: JUnit problems

    by degude
    Replies
    8
    Views
    3,666

    Re: JUnit problems

    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?
  4. Thread: JUnit problems

    by degude
    Replies
    8
    Views
    3,666

    Re: JUnit problems

    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...
  5. Thread: JUnit problems

    by degude
    Replies
    8
    Views
    3,666

    JUnit problems

    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?
    ...
Results 1 to 5 of 5