Skip to content

Commit 729dc28

Browse files
committed
refactor(book-static-async-data): rename getBook to getBookByIsbn
1 parent 589dc39 commit 729dc28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/app/book/shared/book-static-async-data.service.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ describe('BookStaticAsyncDataService', () => {
2323
}));
2424
});
2525

26-
describe('getBook(isbn)', () => {
26+
describe('getBookByIsbn(isbn)', () => {
2727
it('should return the first elemnt of data', inject([BookStaticAsyncDataService], (service: BookStaticAsyncDataService) => {
2828
let result;
29-
service.getBook(123).subscribe((book) => result = book)
29+
service.getBookByIsbn(123).subscribe((book) => result = book)
3030

3131
expect(result).toBe(service.staticBookData[0]);
3232
}));

src/app/book/shared/book-static-async-data.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class BookStaticAsyncDataService {
5050
return Observable.of(this.staticBookData);
5151
}
5252

53-
getBook(isbn): Observable<Book> {
53+
getBookByIsbn(isbn): Observable<Book> {
5454
return Observable.of(this.staticBookData[0]);
5555
}
5656

0 commit comments

Comments
 (0)