mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-04 03:13:49 +00:00
initial SailMaster message splitting in place
This commit is contained in:
1 parent
c802d2885d
commit
7fa4961faa
2 files changed
+6
-1
No files matched your search
+5
@@ -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());
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -17,7 +17,7 @@ public class SailMasterMessageImpl implements SailMasterMessage {
|
||||
|
||||
@Override
|
||||
public String[] getSections() {
|
||||
return getMessage().split("|");
|
||||
return getMessage().split("\\|");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user