zerovm/swift-browser — pull request #74 by mgeisler (2014-09-29 12:51:26+00:00)
Title: Make Swift simulator an Angular service

This pull request moves the state of the simulated Swift server from `$httpBackend` to `SwiftSimulator`. Before, calls to `setContainers` and `setObjects` immediatedly manipulated the `$httpBackend`. Now they instead set state on the `swiftSim` service. Responses are computed on the fly from this state — the `$httpBackend` is thus only configured once and this configuration is static for a given test run.

The end result is that it is much easier to inspect the Swift state in a paused test. The code is also easier to reason about since state is more explicit.