123456789101112131415161718192021222324252627282930 |
- import org.junit.Assert;
- import org.junit.Test;
-
-
- public class MainApplicationTest
- {
- @Test
- public void dogSpeakTest(){
- Pet dog1 = new Dog("Bill");
- String expected = "woof";
- String actual = dog1.speak();
- Assert.assertEquals(expected,actual);
- }
-
- @Test
- public void snakeSpeakTest(){
- Pet snake1 = new Snake("Bill");
- String expected = "hsss";
- String actual = snake1.speak();
- Assert.assertEquals(expected,actual);
- }
-
- @Test
- public void catSpeakTest(){
- Pet cat1 = new Cat("Bill");
- String expected = "meow";
- String actual = cat1.speak();
- Assert.assertEquals(expected,actual);
- }
- }
|