import { Injectable } from '@angular/core' ; import { Observable } from 'rxjs/Observable' ; import { ArmObj } from '../../../../shared/models/arm/arm-obj' ; import { Site } from '../../../../shared/models/arm/site' ; import { PublishingCredentials } from '../../../../shared/models/publishing-credentials' ; export class TestClipboard { getData ( type ) { return 'paste' ; } } @ Injectable ( ) export class MockCacheService { postArm ( resourceId , force ? , apiVersion ? , content ? , cacheKeyPrefix ? ) { return Observable . of ( null ) ; } } @ Injectable ( ) export class MockSiteService { public siteObject = { properties : { hostNameSslStates : [ { name : '' , hostType : 1 } ] , } , } ; getSite ( resourceId ) { return Observable . of ( { isSuccessful : true , result : this . siteObject , } ) ; } } @ Injectable ( ) export class MockConsoleService { send ( method , url , body ? , headers ? ) { return Observable . of ( null ) ; } findMatchingStrings ( allFiles , cmd ) { if ( ! cmd || cmd === '' ) { return allFiles ; } const ltOfDir = [ ] ; cmd = cmd . toLowerCase ( ) ; allFiles . forEach ( element => { if ( element . toLowerCase ( ) . startsWith ( cmd ) ) { ltOfDir . push ( element ) ; } } ) ; return ltOfDir ; } sendResourceId ( resourceId ) { return ; } sendSite ( site ) { return ; } sendPublishingCredentials ( publishingCredentials ) { return ; } getResourceId ( ) { return Observable . of ( null ) ; } getSite ( ) { return Observable . of ( null ) ; } getPublishingCredentials ( ) { return Observable . of ( null ) ; } }