Testing
Every part of the SDK that reaches the outside world can be replaced in a test: the HTTP exchange, the clock, the map's renderer and the navigation.
Every attempt leaves through an HttpExchange. Answer it yourself:
Hand the client the test's dispatcher, and every wait and retry runs on virtual time:
ScriptedMapSurface stands in for the renderer: it records each camera move and plays clicks, hovers and failed requests:
ScriptedNavigationEngine is the navigation in your tests: you answer each route request and hand each position:
Every exception has a public constructor, so a test builds the failure its code handles: