Revision bbe794c6
Added by Andreas Kohlbecker about 8 years ago
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/CdmServerInfoTest.java | ||
---|---|---|
21 | 21 |
import eu.etaxonomy.taxeditor.remoting.server.CDMServerException; |
22 | 22 |
import eu.etaxonomy.taxeditor.remoting.source.CdmServerInfo; |
23 | 23 |
import eu.etaxonomy.taxeditor.remoting.source.CdmServerInfo.CdmInstanceInfo; |
24 |
import eu.etaxonomy.taxeditor.remoting.source.CdmServerInfoConfig; |
|
24 | 25 |
|
25 | 26 |
/** |
26 | 27 |
* @author cmathew |
... | ... | |
42 | 43 |
@Ignore // this should be targetting integration or production |
43 | 44 |
@Test |
44 | 45 |
public void pingInstancesTest() { |
45 |
CdmServerInfo csii = new CdmServerInfo("edit-test", "test.e-taxonomy.eu", 8080, "cdmserver/", false);
|
|
46 |
CdmServerInfo csii = new CdmServerInfo(new CdmServerInfoConfig("edit-test", "test.e-taxonomy.eu", 8080, "cdmserver/", false));
|
|
46 | 47 |
try { |
47 | 48 |
csii.refreshInstances(); |
48 | 49 |
List<CdmInstanceInfo> instances = csii.getInstances(); |
... | ... | |
56 | 57 |
|
57 | 58 |
@Test |
58 | 59 |
public void refreshWrongInstancesTest() { |
59 |
CdmServerInfo wrongCsii = new CdmServerInfo("local", "local", 8080, "noserver", false);
|
|
60 |
CdmServerInfo wrongCsii = new CdmServerInfo(new CdmServerInfoConfig("local", "local", 8080, "noserver", false));
|
|
60 | 61 |
try { |
61 | 62 |
wrongCsii.refreshInstances(); |
62 | 63 |
List<CdmInstanceInfo> instances = wrongCsii.getInstances(); |
... | ... | |
69 | 70 |
@Ignore // this should be targetting integration or production |
70 | 71 |
@Test |
71 | 72 |
public void refreshInstancesTest() throws CDMServerException { |
72 |
CdmServerInfo cdmServerInfo = new CdmServerInfo("edit-test", "test.e-taxonomy.eu", 8080, "cdmserver/", false);
|
|
73 |
CdmServerInfo cdmServerInfo = new CdmServerInfo(new CdmServerInfoConfig("edit-test", "test.e-taxonomy.eu", 8080, "cdmserver/", false));
|
|
73 | 74 |
cdmServerInfo.refreshInstances(); |
74 | 75 |
List<CdmInstanceInfo> instances = cdmServerInfo.getInstances(); |
75 | 76 |
Assert.assertTrue(instances != null && !instances.isEmpty()); |
Also available in: Unified diff
#5533 writing and reading cdmserver configuration from and to JSON file