12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
-
-
- import org.junit.Assert;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- /**
- * The test class PetTest.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class PetTest
- {
-
-
-
- @Test
- public void Dog() {
-
- Pet zero = new Dog("Special Agent Zero \"Skeleton Dog\" Growlkowski");
- String expected = "Special Agent Zero \"Skeleton Dog\" Growlkowski";
- String actual = zero.getName();
-
- Assert.assertEquals(expected, actual);
- }
-
- @Test
- public void Cat() {
- Pet boo = new Cat("Special Agent Zero \"Skeleton Dog\" Growlkowski");
- String expected = "Special Agent Zero \"Skeleton Dog\" Growlkowski";
- String actual = boo.getName();
-
- Assert.assertEquals(expected, actual);
- }
-
-
- @Test
- public void Capybara() {
- Pet rocky = new Capybara("Rocky Pal-boa");
- String expected = "Rocky Pal-boa";
- String actual = rocky.getName();
-
- Assert.assertEquals(expected, actual);
-
- }
- }
|