30 lines
1013 B
Java
30 lines
1013 B
Java
|
package org.gcube.vremanagement.executor.client;
|
||
|
|
||
|
import org.junit.Assert;
|
||
|
import org.junit.Test;
|
||
|
|
||
|
/**
|
||
|
* @author Luca Frosini (ISTI - CNR)
|
||
|
*/
|
||
|
public class SmartExecutorClientTest {
|
||
|
|
||
|
public static final String HTTP_ADDRESS = "http://smartexecutor.d4science.org:8090/smart-executor/rest";
|
||
|
public static final String HTTPS_ADDRESS = "https://smartexecutor.d4science.org:8090/smart-executor/rest";
|
||
|
public static final String HOST = "smartexecutor.d4science.org";
|
||
|
|
||
|
@Test
|
||
|
public void testSetAddress() {
|
||
|
SmartExecutorClientImpl smartExecutorClient = new SmartExecutorClientImpl();
|
||
|
smartExecutorClient.setAddress(HTTP_ADDRESS);
|
||
|
|
||
|
Assert.assertTrue(smartExecutorClient.getAddress().compareTo(HTTP_ADDRESS) == 0);
|
||
|
Assert.assertTrue(smartExecutorClient.getHost().compareTo(HOST) == 0);
|
||
|
|
||
|
smartExecutorClient.setAddress(HTTPS_ADDRESS);
|
||
|
Assert.assertTrue(smartExecutorClient.getAddress().compareTo(HTTPS_ADDRESS) == 0);
|
||
|
Assert.assertTrue(smartExecutorClient.getHost().compareTo(HOST) == 0);
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|