-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGResultsTest.java
More file actions
85 lines (71 loc) · 1.82 KB
/
GResultsTest.java
File metadata and controls
85 lines (71 loc) · 1.82 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
77
78
79
80
81
82
83
84
85
import com.BackEnd.*;
import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
public class GResultsTest {
@Test
public void testGetLink() {
GResults gr = new GResults();
gr.link = "http://localhost/";
assertEquals(gr.getLink(), "http://localhost/");
}
@Test
public void testGetUrl() {
GResults gr = new GResults();
gr.htmlFormattedUrl = "http://localhost/";
assertEquals(gr.getUrl(), "http://localhost/");
}
@Test
public void testSetUrl() {
GResults gr = new GResults();
gr.setUrl("http://localhost/");
assertEquals(gr.htmlFormattedUrl, "http://localhost/");
}
@Test
public void testGetItems() {
GResults gr = new GResults();
List<GResults> items = new ArrayList<GResults>();
gr.items = items;
assertNotNull(gr.getItems());
}
@Test
public void testSetLink() {
GResults gr = new GResults();
gr.setLink("http://localhost/");
assertEquals(gr.link, "http://localhost/");
}
@Test
public void testSetGroups() {
GResults gr = new GResults();
List<GResults> groups = new ArrayList<GResults>();
gr.setGroups(groups);
assertNotNull(gr.items);
}
@Test
public void testGetThing() {
GResults gr = new GResults();
List<GResults> items = new ArrayList<GResults>();
gr.items = items;
GResults gr2 = new GResults();
items.add(gr2);
items.get(0).link = "http://localhost";
gr.getThing(0);
}
@Test
public void testGetLinkInt() {
GResults gr = new GResults();
List<GResults> items = new ArrayList<GResults>();
gr.items = items;
GResults gr2 = new GResults();
items.add(gr2);
items.get(0).link = "http://localhost";
assertEquals(gr.getLink(0), "http://localhost");
}
@Test
public void testToString() {
GResults gr = new GResults();
gr.link = "http://localhost";
assertEquals(gr.toString(), "http://localhost");
}
}