-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathCustomerTest.java
More file actions
50 lines (43 loc) · 1.12 KB
/
CustomerTest.java
File metadata and controls
50 lines (43 loc) · 1.12 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package src.ex7;
import static org.junit.Assert.*;
// import static org.junit.Assert.assertEquals;
// import org.junit.AfterClass;
// import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class CustomerTest
{
private Customer customer;
private String name;
@Parameters
public static Collection<Object[]> data()
{
return Arrays.asList(new Object[][] {
{ "Jhon" }, { "Doo" }, { "Test" }
});
}
public CustomerTest(String name) {
this.name = name;
this.customer = new Customer(name);
}
@Test
public void testGetName()
{
assertEquals("Result", name, customer.getName());
}
@Test
public void testIsMember()
{
assertEquals("Result", false, customer.isMember());
}
@Test
public void testGetMemberType()
{
assertEquals("Result", "", customer.getMemberType());
}
}