smart-executor-client/src/test/java/org/gcube/vremanagement/executor/client/SmartExecutorClientTest.java

30 lines
1013 B
Java
Raw Normal View History

2019-09-20 15:20:40 +02:00
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);
}
}