123456789101112131415161718192021222324252627282930313233343536373839 |
-
-
- import org.junit.Assert;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- /**
- * The test class DogTest.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class DogTest
- {
- Dog zero;
-
- @Before
- public void setup(){
- zero = new Dog("Special Agent Zero \"Skeleton Dog\" Growlkowski");
- }
-
- @Test
- public void speak() {
- String expected = "Grrrrrrr";
- String actual = zero.speak();
-
- Assert.assertEquals(expected, actual);
- }
-
- @Test
- public void name() {
- String expected = "Special Agent Zero \"Skeleton Dog\" Growlkowski";
- String actual = zero.getName();
-
- Assert.assertEquals(expected, actual);
- }
- }
|