1 | package geniusweb.partiesserver.repository;
|
---|
2 |
|
---|
3 | import java.util.Arrays;
|
---|
4 | import java.util.List;
|
---|
5 |
|
---|
6 | import org.junit.Before;
|
---|
7 |
|
---|
8 | import geniusweb.party.Capabilities;
|
---|
9 | import geniusweb.party.DefaultParty;
|
---|
10 | import geniusweb.party.inform.Inform;
|
---|
11 | import tudelft.utilities.junit.GeneralTests;
|
---|
12 |
|
---|
13 | public class AvailablePartyTest extends GeneralTests<AvailableParty> {
|
---|
14 |
|
---|
15 | private AvailableParty party1, party1a, party2;
|
---|
16 |
|
---|
17 | @Before
|
---|
18 | public void before() throws ClassNotFoundException {
|
---|
19 | party1 = new AvailableParty("party1", Party1.class);
|
---|
20 | party1a = new AvailableParty("party1", Party1.class);
|
---|
21 | party2 = new AvailableParty("party2", Party2.class);
|
---|
22 |
|
---|
23 | }
|
---|
24 |
|
---|
25 | @Override
|
---|
26 | public List<List<AvailableParty>> getGeneralTestData() {
|
---|
27 | return Arrays.asList(Arrays.asList(party1, party1a),
|
---|
28 | Arrays.asList(party2));
|
---|
29 | }
|
---|
30 |
|
---|
31 | @Override
|
---|
32 | public List<String> getGeneralTestStrings() {
|
---|
33 | return Arrays.asList("party1.*class geniusweb.*Party1.*",
|
---|
34 | "party2.*class geniusweb.*Party2.*");
|
---|
35 | }
|
---|
36 |
|
---|
37 | }
|
---|
38 |
|
---|
39 | class Party1 extends DefaultParty {
|
---|
40 |
|
---|
41 | @Override
|
---|
42 | public Capabilities getCapabilities() {
|
---|
43 | return null;
|
---|
44 | }
|
---|
45 |
|
---|
46 | @Override
|
---|
47 | public String getDescription() {
|
---|
48 | return null;
|
---|
49 | }
|
---|
50 |
|
---|
51 | @Override
|
---|
52 | public void terminate() {
|
---|
53 |
|
---|
54 | }
|
---|
55 |
|
---|
56 | @Override
|
---|
57 | public void notifyChange(Inform data) {
|
---|
58 |
|
---|
59 | }
|
---|
60 |
|
---|
61 | }
|
---|
62 |
|
---|
63 | class Party2 extends DefaultParty {
|
---|
64 |
|
---|
65 | @Override
|
---|
66 | public Capabilities getCapabilities() {
|
---|
67 | return null;
|
---|
68 | }
|
---|
69 |
|
---|
70 | @Override
|
---|
71 | public String getDescription() {
|
---|
72 | return null;
|
---|
73 | }
|
---|
74 |
|
---|
75 | @Override
|
---|
76 | public void terminate() {
|
---|
77 |
|
---|
78 | }
|
---|
79 |
|
---|
80 | @Override
|
---|
81 | public void notifyChange(Inform data) {
|
---|
82 |
|
---|
83 | }
|
---|
84 |
|
---|
85 | } |
---|