graycoreio/daffodil

View on GitHub
libs/newsletter/driver/testing/src/drivers/newsletter.service.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { Injectable } from '@angular/core';
import {
  Observable,
  of,
} from 'rxjs';
import { delay } from 'rxjs/operators';

import { DaffNewsletterUnion } from '@daffodil/newsletter';
import { DaffNewsletterServiceInterface } from '@daffodil/newsletter/driver';

@Injectable({
  providedIn: 'root',
})

export class DaffTestingNewsletterService implements DaffNewsletterServiceInterface<DaffNewsletterUnion, any>{
  send(payload: DaffNewsletterUnion): Observable<any>{
    return of('Success').pipe(delay(10));
  }
}