Fix tests

This commit is contained in:
Victor Shcherb 2016-04-28 10:31:27 +02:00
parent f545de9b38
commit 1acc561d38

View file

@ -99,7 +99,7 @@ public class RouteResultPreparationTest {
String turnLanes = turn +":" +lanes; String turnLanes = turn +":" +lanes;
String name = routeSegments.get(prevSegment).getDescription(); String name = routeSegments.get(prevSegment).getDescription();
long segmentId = routeSegments.get(prevSegment).getObject().getId(); long segmentId = routeSegments.get(prevSegment).getObject().getId() >> (BinaryInspector.SHIFT_ID );
String expectedResult = expectedResults.get(segmentId); String expectedResult = expectedResults.get(segmentId);
if (expectedResult != null) { if (expectedResult != null) {
if(!Algorithms.objectEquals(expectedResult, turnLanes) && if(!Algorithms.objectEquals(expectedResult, turnLanes) &&
@ -116,13 +116,13 @@ public class RouteResultPreparationTest {
} }
if (i < routeSegments.size()) { if (i < routeSegments.size()) {
reachedSegments.add(routeSegments.get(i).getObject().getId()); reachedSegments.add(routeSegments.get(i).getObject().getId() >> (BinaryInspector.SHIFT_ID ));
} }
} }
Set<Long> expectedSegments = expectedResults.keySet(); Set<Long> expectedSegments = expectedResults.keySet();
for (Long expSegId : expectedSegments){ for (Long expSegId : expectedSegments){
Assert.assertTrue("Expected segment " + (expSegId) + Assert.assertTrue("Expected segment " + (expSegId ) +
" weren't reached in route segments " + reachedSegments.toString(), reachedSegments.contains(expSegId)); " weren't reached in route segments " + reachedSegments.toString(), reachedSegments.contains(expSegId));
} }