mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-17 01:31:01 +00:00
adjusted test verdict related to TimeRange's end now being exclusive
Change-Id: I063d9e28a0f9ec662966d6f98708b9aa7355b3d0
This commit is contained in:
1 parent
0765d330b0
commit
296866a6f7
2 files changed
+11
-2
No files matched your search
+7
@@ -1,5 +1,6 @@
|
||||
package com.sap.sailing.domain.common.racelog.tracking;
|
||||
|
||||
import com.sap.sse.common.TimeRange;
|
||||
import com.sap.sse.common.util.UrlHelper;
|
||||
|
||||
/**
|
||||
@@ -35,6 +36,12 @@ public class DeviceMappingConstants {
|
||||
public static final String JSON_DEVICE_TYPE = "deviceType";
|
||||
public static final String JSON_PUSH_DEVICE_ID = "pushDeviceId";
|
||||
public static final String JSON_FROM_MILLIS = "fromMillis";
|
||||
|
||||
/**
|
||||
* The parameter to specify the end of the mapping interval, inclusively. Note that when asking a {@link TimeRange} describing
|
||||
* the interval, the {@link TimeRange#to()} method has to return a value "infinitesimally" later than the time point provided here
|
||||
* because {@link TimeRange}s have an <em>exclusive</em> end.
|
||||
*/
|
||||
public static final String JSON_TO_MILLIS = "toMillis";
|
||||
public static final String JSON_TEAM_IMAGE_URI = "teamImageUri";
|
||||
|
||||
|
||||
+4
-2
@@ -2,6 +2,8 @@ package com.sap.sailing.server.gateway.test.jaxrs;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
@@ -101,8 +103,8 @@ public class LeaderboardsResourceCheckinAndOutTest extends AbstractJaxRsApiTest
|
||||
|
||||
mappings = new RegattaLogDeviceCompetitorMappingFinder(log).analyze();
|
||||
mappingForC = mappings.get(competitor).get(0);
|
||||
assertThat("mapping now ends at checkout timepoint", mappingForC.getTimeRange().to().asMillis(),
|
||||
equalTo(toMillis));
|
||||
assertTrue("mapping now ends at checkout timepoint", mappingForC.getTimeRange().includes(new MillisecondsTimePoint(toMillis)));
|
||||
assertFalse("mapping now ends at checkout timepoint", mappingForC.getTimeRange().includes(new MillisecondsTimePoint(toMillis+1)));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user