Refactoring
This commit is contained in:
parent
6e49a8d654
commit
10234dc38a
|
@ -1,6 +1,5 @@
|
|||
package org.gcube.spatial.data.clients;
|
||||
|
||||
import org.gcube.spatial.data.clients.model.ConnectionDescriptor;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
|
|
|
@ -3,28 +3,10 @@ package org.gcube.spatial.data.clients;
|
|||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.gcube.spatial.data.clients.model.ClientInfo;
|
||||
import org.gcube.spatial.data.clients.model.engine.Engine;
|
||||
import org.gcube.spatial.data.clients.model.engine.Range;
|
||||
import org.junit.Test;
|
||||
|
||||
public class Tests {
|
||||
|
||||
@Test
|
||||
public void testRanges() {
|
||||
ClientInfo gnClient=new ClientInfo("gn2-client","GeoNetwork 2","Client to communicate with GN 2","org.gcube.sdi.some.clients.Client",
|
||||
new Engine(Engine.GN_ENGINE,"",new Range("1.1.0",null)));
|
||||
|
||||
|
||||
assertFalse(new Range("1.1.0",null).supports("0.0.1"));
|
||||
assertFalse(new Range(null,"3.4").supports("4.2.1"));
|
||||
|
||||
|
||||
assertTrue(new Range("1.1.0",null).supports("2.0.1"));
|
||||
assertTrue(new Range("1.1.0","2.2").supports("2.0.1"));
|
||||
assertTrue(new Range("1.2",null).supports("1.2.1"));
|
||||
assertTrue(new Range(null,"3.4").supports("1.2.1"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
package org.gcube.spatial.data.plugins;
|
||||
|
||||
public interface GISServicePlugin {
|
||||
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package org.gcube.spatial.data.sdi;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.gcube.spatial.data.clients.model.ClientInfo;
|
||||
import org.gcube.spatial.data.clients.model.engine.Engine;
|
||||
import org.gcube.spatial.data.clients.model.engine.Range;
|
||||
import org.junit.Test;
|
||||
|
||||
public class Clients {
|
||||
|
||||
@Test
|
||||
public void testRanges() {
|
||||
ClientInfo gnClient=new ClientInfo("gn2-client","GeoNetwork 2","Client to communicate with GN 2","org.gcube.sdi.some.clients.Client",
|
||||
new Engine(Engine.GN_ENGINE,"",new Range("1.1.0",null)));
|
||||
|
||||
|
||||
assertFalse(new Range("1.1.0",null).supports("0.0.1"));
|
||||
assertFalse(new Range(null,"3.4").supports("4.2.1"));
|
||||
|
||||
|
||||
assertTrue(new Range("1.1.0",null).supports("2.0.1"));
|
||||
assertTrue(new Range("1.1.0","2.2").supports("2.0.1"));
|
||||
assertTrue(new Range("1.2",null).supports("1.2.1"));
|
||||
assertTrue(new Range(null,"3.4").supports("1.2.1"));
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue