12345678910111213141516171819202122232425262728293031323334353637383940 |
-
-
- import org.junit.Assert;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- /**
- * The test class CatTest.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class CatTest
- {
- Cat boo;
-
- @Before
- public void setup(){
- boo = new Cat("Boo Saurus Rex");
- }
-
- @Test
- public void speak() {
- String expected = "Meow";
- String actual = boo.speak();
-
- Assert.assertEquals(expected, actual);
- }
-
- @Test
- public void name() {
- String expected = "Boo Saurus Rex";
- String actual = boo.getName();
-
- Assert.assertEquals(expected, actual);
- }
-
- }
|