Angular 2 - Testing components with Router and routeParams in constructor
<p>When trying to test a component with routeParams or router in the constructor one gets error:</p>

<p>No provider for RouteParams</p>

<p>Here is my component example:</p>

<pre><code>@Component({
  selector: 'memory',
  template: '',  
})
export class TestedComponent {
  constructor(
    private _someService: SomeService,
    private _routeParams: RouteParams,
    private _router: Router
  ) {
    this.whatever = this._someService.find(this._routeParams.get('id'));
  }
}
</code></pre>

<p>It took me a lot of time to find this solution, and I would like to share it!</p>