initial SailMaster message splitting in place

This commit is contained in:
Axel Uhl committed 2011-09-30 11:18:49 +02:00
1 parent c802d2885d
commit 7fa4961faa
2 files changed
+6 -1

No files matched your search

@@ -1,9 +1,12 @@
package com.sap.sailing.domain.swisstimingadapter.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.net.UnknownHostException;
import java.util.Arrays;
import org.junit.After;
import org.junit.Before;
@@ -37,5 +40,7 @@ public class SailMasterConnectivityTest {
public void testRaceId() throws UnknownHostException, IOException {
SailMasterMessage response = connector.sendRequestAndGetResponse("RaceId");
assertEquals("RaceId|4711,A wonderful test race|4712,Not such a wonderful race", response.getMessage());
assertArrayEquals(new String[] { "RaceId", "4711,A wonderful test race",
"4712,Not such a wonderful race" }, response.getSections());
}
}
@@ -17,7 +17,7 @@ public class SailMasterMessageImpl implements SailMasterMessage {
@Override
public String[] getSections() {
return getMessage().split("|");
return getMessage().split("\\|");
}
@Override