mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-03 19:03:52 +00:00
added test case for UUID-based property parsing
This commit is contained in:
1 parent
ef4de09889
commit
232f93f98f
2 files changed
+22
-3
No files matched your search
+18
-3
@@ -6,17 +6,32 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.sap.sailing.domain.tractracadapter.impl.ClientParamsPHP;
|
||||
import com.sap.sailing.domain.tractracadapter.impl.ClientParamsPHP.Route;
|
||||
|
||||
public class ClientParamsPHPTest {
|
||||
@Test
|
||||
public void testRead() throws IOException {
|
||||
private ClientParamsPHP clientParams;
|
||||
|
||||
@Before
|
||||
public void setUp() throws IOException {
|
||||
InputStream is = getClass().getResourceAsStream("/clientparamsLahainaTest3.php");
|
||||
Reader r = new InputStreamReader(is);
|
||||
ClientParamsPHP clientParams = new ClientParamsPHP(r);
|
||||
clientParams = new ClientParamsPHP(r);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRead() throws IOException {
|
||||
assertEquals("event_20110505_SailingTea", clientParams.getEventDB());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRouteFromUUID() {
|
||||
Route route = clientParams.new Route(UUID.fromString("82be60fa-58cd-11e1-b933-406186cbf87c"));
|
||||
assertEquals("Lahaina-test3", route.getDescription());
|
||||
}
|
||||
}
|
||||
+4
@@ -105,6 +105,10 @@ public class ClientParamsPHP {
|
||||
public Route(UUID uuid) {
|
||||
super(uuid);
|
||||
}
|
||||
|
||||
public Object getDescription() {
|
||||
return getProperty("Description");
|
||||
}
|
||||
}
|
||||
|
||||
public class Image extends ObjectWithUUID {
|
||||
|
||||
Reference in new issue
Block a user