mirror of
https://github.com/mapillary/mapillary-js.git
synced 2026-01-18 13:56:53 +00:00
Avoid setting static properties which affects all future Viewers created in the same app. Use observables instead.
27 lines
747 B
TypeScript
27 lines
747 B
TypeScript
import { Subject } from "rxjs";
|
|
|
|
import { MockCreator } from "./MockCreator";
|
|
import { MockCreatorBase } from "./MockCreatorBase";
|
|
|
|
import { ConfigurationService } from "../../src/viewer/ConfigurationService";
|
|
|
|
export class ConfigurationServiceMockCreator extends
|
|
MockCreatorBase<ConfigurationService> {
|
|
public create(): ConfigurationService {
|
|
const mock: ConfigurationService =
|
|
new MockCreator()
|
|
.create(ConfigurationService, "ConfigurationService");
|
|
|
|
this._mockProperty(
|
|
mock,
|
|
"exploreUrl$",
|
|
new Subject<string>());
|
|
this._mockProperty(
|
|
mock,
|
|
"imageTiling$",
|
|
new Subject<boolean>());
|
|
|
|
return mock;
|
|
}
|
|
}
|