-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathCatTest.java
More file actions
31 lines (27 loc) · 833 Bytes
/
CatTest.java
File metadata and controls
31 lines (27 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package io.zipcoder;
import org.junit.Assert;
import org.junit.Test;
public class CatTest {
@Test
public void testSpeak() {
// Arrange: create an instance variable (myCat) of the object to act on
Cat myCat = new Cat("Smalls");
String expected = "Meow!";
//Act: call method on our object
String actual = myCat.speak();
//Assert: check the outcome on what we expect.
Assert.assertEquals(expected,actual);
}
@Test
public void testGetName(){
Cat myCat = new Cat("Smalls");
String expected = "Smalls";
//Act: call method on our object
String actual = myCat.getName();
//Assert: check the outcome on what we expect.
Assert.assertEquals(expected,actual);
}
@Test
public void testSetName(){
}
}