title: Angular 7 Test: NullInjectorError: No provider for ActivatedRoute
body: <p>Hi have some error with testing my App made with Angular 7. I do not have much experience in angular, so I would need your help+</p>
  
  <pre><code>Error: StaticInjectorError(DynamicTestModule)[BeerDetailsComponent -&gt; ActivatedRoute]: 
    StaticInjectorError(Platform: core)[BeerDetailsComponent -&gt; ActivatedRoute]: 
      NullInjectorError: No provider for ActivatedRoute!
  </code></pre>
  
  <p>the testing code is like this:</p>
  
  <pre><code>import { async, ComponentFixture, TestBed, inject } from '@angular/core/testing';
  import { BeerDetailsComponent } from './beer-details.component';
  import {
    HttpClientTestingModule,
    HttpTestingController
  } from '@angular/common/http/testing';
  
  describe('BeerDetailsComponent', () =&gt; {
    let component: BeerDetailsComponent;
    let fixture: ComponentFixture&lt;BeerDetailsComponent&gt;;
  
    beforeEach(async(() =&gt; {
      TestBed.configureTestingModule({
        imports: [HttpClientTestingModule],
        declarations: [ BeerDetailsComponent ]
      })
      .compileComponents();
    }));
  
    beforeEach(() =&gt; {
      fixture = TestBed.createComponent(BeerDetailsComponent);
      component = fixture.componentInstance;
      fixture.detectChanges();
    });
  
    it('should create',
    inject(
      [HttpTestingController],
      () =&gt; {
        expect(component).toBeTruthy();
      }
    )
  )
  });
  </code></pre>
  
  <p>I really can't find any solution.</p>
  
  <p>Daniele</p>