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

ScrabbleTest.java 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. Scrabble scrabble;
  14. /**
  15. * Default constructor for test class ScrabbleTest
  16. */
  17. public ScrabbleTest()
  18. {
  19. }
  20. /**
  21. * Sets up the test fixture.
  22. *
  23. * Called before every test case method.
  24. */
  25. @Before
  26. public void setUp()
  27. {
  28. scrabble = new Scrabble();
  29. }
  30. @Test
  31. public void scrabbleTest1() {
  32. assertEquals(9,scrabble.score("snake"));
  33. }
  34. @Test
  35. public void scrabbleTest2() {
  36. assertEquals(11,scrabble.score("mamba"));
  37. }
  38. @Test
  39. public void scrabbleTest3() {
  40. assertEquals(22,scrabble.score("Quiz"));
  41. }
  42. /**
  43. * Tears down the test fixture.
  44. *
  45. * Called after every test case method.
  46. */
  47. @After
  48. public void tearDown()
  49. {
  50. }
  51. }