3 * Copyright (C) 2015 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.ui
.dialogs
;
12 import java
.util
.List
;
14 import org
.junit
.Assert
;
15 import org
.junit
.Ignore
;
16 import org
.junit
.Test
;
17 import org
.unitils
.UnitilsJUnit4
;
19 import eu
.etaxonomy
.taxeditor
.remoting
.server
.CDMServerException
;
20 import eu
.etaxonomy
.taxeditor
.remoting
.source
.CdmServerInfo
;
21 import eu
.etaxonomy
.taxeditor
.remoting
.source
.CdmServerInfo
.CdmInstanceInfo
;
29 public class CdmServerInfoTest
extends UnitilsJUnit4
{
32 public void pingServersTest() {
33 List
<CdmServerInfo
> servers
= CdmServerInfo
.getCdmServers();
34 for(CdmServerInfo server
: servers
) {
39 // FIXME:Remoting this is an integration test and should be run against a
43 public void pingInstancesTest() {
44 CdmServerInfo csii
= new CdmServerInfo("localhost", "localhost", 8080);
46 csii
.refreshInstances();
47 List
<CdmInstanceInfo
> instances
= csii
.getInstances();
48 for(CdmInstanceInfo instance
: instances
) {
49 Assert
.assertTrue(csii
.pingInstance(instance
));
51 } catch (CDMServerException e
) {
52 Assert
.fail("Execption should not be thrown here");
57 public void refreshWrongInstancesTest() {
58 CdmServerInfo wrongCsii
= new CdmServerInfo("local", "local", 8080);
60 wrongCsii
.refreshInstances();
61 List
<CdmInstanceInfo
> instances
= wrongCsii
.getInstances();
62 Assert
.fail("Execption should be thrown here");
63 } catch (CDMServerException e
) {