import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';

/* tslint:disable */
@Injectable()
export class ActivatedRouteMock {

    // ActivatedRoute.params is Observable
    private subject = new BehaviorSubject(this.testParams);
    params = this.subject.asObservable();

    // Test parameters
    private _testParams: {};
    get testParams() { return this._testParams; }
    set testParams(params: {}) {
        this._testParams = params;
        this.subject.next(params);
    }
    private _queryParams: {}
    get queryParams() { return this._queryParams; }
    set queryParams(params: {}) {
        this._queryParams = params;
        this.subject.next(params);
    }

    // ActivatedRoute.snapshot.params
    get snapshot() {
        return {
            params: this.testParams,
            queryParams: this.queryParams,
        };
    }
}

@Injectable()
export class ActivatedRouteSnapshotMock {
    params: any;
    url: any;
    queryParams: any;
    fragment: any;
    data: any;
    outlet: any;
    component: any;
    routeConfig: any;
    root: any;
    parent: any;
    firstChild: any;
    children: any;
    pathFromRoot: any;

    paramMap: any;
    queryParamMap: any;
}
/* tslint:enable */
