-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fixed up mapmatching API * removed unused import * fixed mapmatching rx * fixed map matching test
- Loading branch information
Cameron Mace
authored
Jul 14, 2017
1 parent
c5d2525
commit 791ca02
Showing
11 changed files
with
542 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
mapbox/libjava-services-rx/src/test/java/com/mapbox/services/api/rx/BaseTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.mapbox.services.api.rx; | ||
|
||
import com.google.gson.JsonParser; | ||
|
||
import java.io.IOException; | ||
import java.nio.charset.Charset; | ||
import java.nio.file.Files; | ||
import java.nio.file.Paths; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class BaseTest { | ||
|
||
protected static final double DELTA = 1E-10; | ||
|
||
public void compareJson(String json1, String json2) { | ||
JsonParser parser = new JsonParser(); | ||
assertEquals(parser.parse(json1), parser.parse(json2)); | ||
} | ||
|
||
protected String loadJsonFixture(String filename) throws IOException { | ||
byte[] content = Files.readAllBytes(Paths.get(filename)); | ||
return new String(content, Charset.forName("utf-8")); | ||
} | ||
|
||
protected String loadJsonFixture(String folder, String filename) throws IOException { | ||
byte[] content = Files.readAllBytes(Paths.get("src/test/fixtures/" + folder + "/" + filename)); | ||
return new String(content, Charset.forName("utf-8")); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.