FishTest.java 419B

123456789101112131415161718192021222324
  1. import org.junit.Assert;
  2. import org.junit.After;
  3. import org.junit.Before;
  4. import org.junit.Test;
  5. /**
  6. * The test class FishTest.
  7. *
  8. * @author (your name)
  9. * @version (a version number or a date)
  10. */
  11. public class FishTest
  12. {
  13. @Test
  14. public void testFishSpeak(){
  15. Pet test = new Fish("test");
  16. String expected = "blublublu";
  17. String actual = test.speak();
  18. Assert.assertEquals(expected,actual);
  19. }
  20. }