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

ScrabbleTest.java 589B

12345678910111213141516171819202122232425262728293031
  1. import static org.junit.Assert.*;
  2. import org.junit.After;
  3. import org.junit.Before;
  4. import org.junit.Test;
  5. public class ScrabbleTest
  6. {
  7. /**
  8. * Default constructor for test class ScrabbleTest
  9. */
  10. public ScrabbleTest()
  11. {
  12. }
  13. Scrabble scrabble = new Scrabble();
  14. @Test
  15. public void word()
  16. {
  17. String word = "word";
  18. int expected = 8;
  19. assertEquals(scrabble.score(word), 8);
  20. }
  21. @Test
  22. public void wordInCaps()
  23. {
  24. String word = "WORD";
  25. int expected = 8;
  26. assertEquals(scrabble.score(word), 8);
  27. }
  28. }