<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">import junit.framework.TestCase;

/** Contains methods to test methods of class WuerfelSpiel. */
public class WuerfelSpielTester 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 b should be used as follows.
            For each of the 200 times that WuerfelSpiel.throwDie()
            is called and produces a value i (say) in the range
            1..6, set b[i] to true.
            
            After calling WuerfelSpiel.throwDie() 200 times,
            Then check (using assertEquals calls) whether
            all the values in b are true.
            */
        boolean[] b= {true, false, false, false, false, false, false};
        
        for (int k= 0; k &lt; 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 &lt;= i &amp;&amp; i &lt;= 6);
            */
            
            
            /* YOU IMPLEMENT THE FOLLOWING, THEN DELETE THIS COMMENT:
                Set b[i] to true.
            */

        }
        
        /* YOU IMPLEMENT THE FOLLOWING, THEN DELETE THIS COMMENT:
           Write a loop to call assertEquals for each array element
           of array b to check whether its value is true.
        */
        
    }
    
    
    /** Test function WuerfelSpiel.toString(String[]). */
    public void testToString() {
        /** The body of this function should create an array
            of Strings, call WuerfelSpiel.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 createSpiel().*/
    public void testCreateSpiel() {
        String[] b= WuerfelSpiel.createSpiel();
        assertEquals("measures/M" + 96 + ".wav", b[0]);
    }
    
}
</pre></body></html>