import junit.framework.TestCase;

/** Contains methods to test methods of class WuerfelSpiel. */
public class WurfelSpielTester extends TestCase {
    
    /**
     * Test throwDie. Do this by calling it 200 times and
       making sure:
       (1) Each value returned is in the range 1..6.
       (2) All values in 1..6 are returned by at least one call.
     */
    public void testThrowDie() {
        /** Boolean array c should be used as follows.
            For each of the 200 times that WurfelSpiel.throwDie()
            is called and produces a value i (say) in the range
            1..6, set c[i] to true.
            
            After calling WurfelSpiel.throwDie() 200 times,
            check (using assertEquals calls) whether
            all the values in c are true.
            */
        boolean[] c= {true, false, false, false, false, false, false};
        // inv: k calls on throwDie have been made. All of them have been in
        //      the range 1..6 (unless the call on assertEquals failed). For
        //      each i, c[i] is true if and nly if one of the calls produced the value i.
        for (int k= 0; k < 200; k= k+1) {
            /* YOU IMPLEMENT THE FOLLOWING, THEN DELETE THIS COMMENT:
                CALL throwDie and store its value in a variable i.
            */
            
            
            
            /* YOU IMPLEMENT THE FOLLOWING, THEN DELETE THIS COMMENT:
                Use an assertEquals call to check whether i
               is in the range 1..6.
               assertEquals(true, 1 <= i && i <= 6);
            */
            
            
            /* YOU IMPLEMENT THE FOLLOWING, THEN DELETE THIS COMMENT:
                Set c[i] to true.
            */

        }
        
        /* YOU IMPLEMENT THE FOLLOWING, THEN DELETE THIS COMMENT:
           Write a loop to call assertEquals for each array element
           of array c to check whether its value is true.
        */
        
    }
    
    
    /** Test function WurfelSpiel.toString(String[]). */
    public void testToString() {
        /** The body of this function should create an array
            of Strings, call WurfelSpiel.toString(String[])
            with this array as argument, and use an assertEquals
            statement to check that the result is corect.
            
            You need at least four test cases: Array of length
            0, 1, 2, and some number greater than 2. */
    }
    
    /** Test function create1Spiel().*/
    public void testCreate1Spiel() {
        String[] b= WurfelSpiel.create1Spiel();
        assertEquals("measures/m" + 96 + ".wav", b[0]);
    }
    
}
