-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathAddressListTest.java
More file actions
76 lines (52 loc) · 1.64 KB
/
Copy pathAddressListTest.java
File metadata and controls
76 lines (52 loc) · 1.64 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package Model;
import java.util.ArrayList;
import java.util.List;
import com.lob.model.AddressList;
import com.lob.model.Address;
import org.testng.Assert;
import org.testng.annotations.Test;
public class AddressListTest {
private final AddressList model = new AddressList();
@Test
public void testAddressList() {
Assert.assertNotNull(model);
}
@Test
public void dataTest() {
List<Address> data = new ArrayList<Address>();
model.setData(data);
Assert.assertEquals(model.getData(), data);
}
@Test
public void _objectTest() {
model.setObject("Address");
Assert.assertNotNull(model.getObject());
Assert.assertEquals(model.getObject(), "Address");
}
@Test
public void nextUrlTest() {
model.setNextUrl("some url");
Assert.assertNotNull(model.getNextUrl());
Assert.assertEquals(model.getNextUrl(), "some url");
}
@Test
public void previousUrlTest() {
model.setPreviousUrl("some url");
Assert.assertNotNull(model.getPreviousUrl());
Assert.assertEquals(model.getPreviousUrl(), "some url");
}
@Test
public void countTest() {
Integer count = 1;
model.setCount(count);
Assert.assertNotNull(model.getCount());
Assert.assertEquals(model.getCount(), count);
}
@Test
public void totalCountTest() {
Integer totalCount = 100;
model.setTotalCount(totalCount);
Assert.assertNotNull(model.getTotalCount());
Assert.assertEquals(model.getTotalCount(), totalCount);
}
}