some code samples, various examples of simple modeling ideas and some minor algorithms.

123456789101112131415161718192021222324252627282930313233343536
  1. import static org.junit.Assert.*;
  2. import org.junit.After;
  3. import org.junit.Before;
  4. import org.junit.Test;
  5. /**
  6. * The test class ScrabbleTest.
  7. *
  8. * @author (your name)
  9. * @version (a version number or a date)
  10. */
  11. public class ScrabbleTest
  12. {
  13. /**
  14. * Default constructor for test class ScrabbleTest
  15. */
  16. Scrabble rabble = new Scrabble();
  17. @Test
  18. public void ScoreTest(){
  19. //given:
  20. String word = "Zoo";
  21. //then:
  22. int expected = 12;
  23. int actual = rabble.score(word);
  24. //assert:
  25. assertEquals(expected,actual);
  26. }
  27. }