import { Injectable } from '@angular/core' ; import { Observable , of , } from 'rxjs' ; import { DaffCountry } from '@daffodil/geography' ; import { DaffGeographyServiceInterface } from '@daffodil/geography/driver' ; import { DaffCountryFactory , DaffSubdivisionFactory , } from '@daffodil/geography/testing' ; inheritdoc @ Injectable ( { providedIn : 'root' , } ) export class DaffTestingGeographyService implements DaffGeographyServiceInterface < DaffCountry > { constructor ( private countryFactory , private subdivisionFactory ) { } get ( countryId ) { return of ( this . countryFactory . create ( { id : countryId , subdivisions : this . subdivisionFactory . createMany ( 3 ) , } ) ) ; } list ( ) { return of ( this . countryFactory . createMany ( 5 ) ) ; } }