refactor(tests): removed @IMPLEMENTS
This commit is contained in:
@@ -10,7 +10,6 @@ import {
|
||||
SpyObject,
|
||||
proxy
|
||||
} from 'angular2/test_lib';
|
||||
import {IMPLEMENTS} from 'angular2/src/core/facade/lang';
|
||||
import {Serializer} from 'angular2/src/web_workers/shared/serializer';
|
||||
import {NgZone} from 'angular2/src/core/zone/ng_zone';
|
||||
import {ON_WEB_WORKER} from 'angular2/src/web_workers/shared/api';
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
library web_workers.spies;
|
||||
|
||||
import 'package:angular2/src/web_workers/shared/client_message_broker.dart';
|
||||
import 'package:angular2/test_lib.dart';
|
||||
|
||||
@proxy
|
||||
class SpyMessageBroker extends SpyObject implements ClientMessageBroker {
|
||||
noSuchMethod(m) => super.noSuchMethod(m);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import {ClientMessageBroker} from 'angular2/src/web_workers/shared/client_message_broker';
|
||||
|
||||
import {SpyObject, proxy} from 'angular2/test_lib';
|
||||
|
||||
export class SpyMessageBroker extends SpyObject {
|
||||
constructor() { super(ClientMessageBroker); }
|
||||
}
|
||||
@@ -6,11 +6,10 @@ import {
|
||||
expect,
|
||||
beforeEach,
|
||||
createTestInjector,
|
||||
beforeEachBindings,
|
||||
SpyObject,
|
||||
proxy
|
||||
beforeEachBindings
|
||||
} from 'angular2/test_lib';
|
||||
import {IMPLEMENTS, Type} from 'angular2/src/core/facade/lang';
|
||||
import {SpyMessageBroker} from './spies';
|
||||
import {Type} from 'angular2/src/core/facade/lang';
|
||||
import {
|
||||
ClientMessageBroker,
|
||||
UiArguments,
|
||||
@@ -44,13 +43,6 @@ export function main() {
|
||||
});
|
||||
}
|
||||
|
||||
@proxy
|
||||
@IMPLEMENTS(ClientMessageBroker)
|
||||
class SpyMessageBroker extends SpyObject {
|
||||
constructor() { super(ClientMessageBroker); }
|
||||
noSuchMethod(m) { return super.noSuchMethod(m); }
|
||||
}
|
||||
|
||||
class MockMessageBrokerFactory extends ClientMessageBrokerFactory {
|
||||
constructor(private _messageBroker: ClientMessageBroker) { super(null, null); }
|
||||
createMessageBroker(channel: string) { return this._messageBroker; }
|
||||
|
||||
Reference in New Issue
Block a user