Skip to content

Commit ff4f7ed

Browse files
committed
test(book-static-service): deactivate all tests
1 parent 777ac20 commit ff4f7ed

File tree

1 file changed

+46
-51
lines changed

1 file changed

+46
-51
lines changed
Lines changed: 46 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,67 @@
1-
import { TestBed, inject } from '@angular/core/testing';
2-
31
import { BookStaticDataService } from './book-static-data.service';
42
import { Book } from './book';
53

64
describe('BookStaticDataService', () => {
7-
beforeEach(() => {
8-
TestBed.configureTestingModule({
9-
providers: [BookStaticDataService]
10-
});
11-
});
125

13-
it('should be created', inject([BookStaticDataService], (service: BookStaticDataService) => {
14-
expect(service).toBeTruthy();
15-
}));
6+
it('should be created', () => {
7+
//expect(service).toBeTruthy();
8+
expect(true).toBeFalsy();
9+
});
1610

1711
describe('getBooks()', () => {
18-
it('should return the complete array of data', inject([BookStaticDataService], (service: BookStaticDataService) => {
19-
expect(service.getBooks()).toBe(service.staticBookData);
20-
}));
12+
it('should return the complete array of static data', () => {
13+
expect(true).toBeFalsy();
14+
});
2115
});
2216

2317
describe('getBook(isbn)', () => {
24-
it('should return the first elemnt of data', inject([BookStaticDataService], (service: BookStaticDataService) => {
25-
expect(service.getBook(123)).toBe(service.staticBookData[0]);
26-
}));
18+
it('should always return the first element of data', () => {
19+
expect(true).toBeFalsy();
20+
});
2721
});
2822

2923
describe('getBook(book)', () => {
30-
it('should return the book argument itself', inject([BookStaticDataService], (service: BookStaticDataService) => {
31-
const book: Book = service.staticBookData[0];
32-
expect(service.updateBook(book)).toBe(book);
33-
}));
24+
it('should return the given book argument itself', () => {
25+
expect(true).toBeFalsy();
26+
});
3427
});
3528

3629

3730
describe('createBook(book)', () => {
38-
it('should return the book argument itself', inject([BookStaticDataService], (service: BookStaticDataService) => {
39-
const book: Book = {
40-
'title': 'The New Design Patterns',
41-
'subtitle': 'Elements of Reusable Object-Oriented Software',
42-
'isbn': '978-0-20163-361-0',
43-
'abstract': 'Capturing a wealth of experience about the design of object-oriented software, four top-notch designers present a catalog of simple and succinct solutions to commonly occurring design problems. Previously undocumented, these 23 patterns allow designers to create more flexible, elegant, and ultimately reusable designs without having to rediscover the design solutions themselves.',
44-
'numPages': 395,
45-
'author': 'Erich Gamma / Richard Helm / Ralph E. Johnson / John Vlissides',
46-
'publisher': {
47-
'name': 'Addison-Wesley',
48-
'url': 'http://www.addison-wesley.de/'
49-
}
50-
};
51-
expect(service.createBook(book)).toBe(book);
52-
}));
31+
it('should return the book argument itself', () => {
32+
33+
// const book: Book = {
34+
// 'title': 'The New Design Patterns',
35+
// 'subtitle': 'Elements of Reusable Object-Oriented Software',
36+
// 'isbn': '978-0-20163-361-0',
37+
// 'abstract': 'Capturing a wealth of experience about the design of object-oriented software, four top-notch designers present a catalog of simple and succinct solutions to commonly occurring design problems. Previously undocumented, these 23 patterns allow designers to create more flexible, elegant, and ultimately reusable designs without having to rediscover the design solutions themselves.',
38+
// 'numPages': 395,
39+
// 'author': 'Erich Gamma / Richard Helm / Ralph E. Johnson / John Vlissides',
40+
// 'publisher': {
41+
// 'name': 'Addison-Wesley',
42+
// 'url': 'http://www.addison-wesley.de/'
43+
// }
44+
// };
45+
expect(true).toBeFalsy();
46+
47+
});
48+
49+
it('should add the new book to the dataset', () => {
50+
// const book: Book = {
51+
// 'title': 'The New Design Patterns',
52+
// 'subtitle': 'Elements of Reusable Object-Oriented Software',
53+
// 'isbn': '978-0-20163-361-0',
54+
// 'abstract': 'Capturing a wealth of experience about the design of object-oriented software, four top-notch designers present a catalog of simple and succinct solutions to commonly occurring design problems. Previously undocumented, these 23 patterns allow designers to create more flexible, elegant, and ultimately reusable designs without having to rediscover the design solutions themselves.',
55+
// 'numPages': 395,
56+
// 'author': 'Erich Gamma / Richard Helm / Ralph E. Johnson / John Vlissides',
57+
// 'publisher': {
58+
// 'name': 'Addison-Wesley',
59+
// 'url': 'http://www.addison-wesley.de/'
60+
// }
61+
// };
62+
expect(true).toBeFalsy();
5363

54-
it('should add the new book to the dataset', inject([BookStaticDataService], (service: BookStaticDataService) => {
55-
const book: Book = {
56-
'title': 'The New Design Patterns',
57-
'subtitle': 'Elements of Reusable Object-Oriented Software',
58-
'isbn': '978-0-20163-361-0',
59-
'abstract': 'Capturing a wealth of experience about the design of object-oriented software, four top-notch designers present a catalog of simple and succinct solutions to commonly occurring design problems. Previously undocumented, these 23 patterns allow designers to create more flexible, elegant, and ultimately reusable designs without having to rediscover the design solutions themselves.',
60-
'numPages': 395,
61-
'author': 'Erich Gamma / Richard Helm / Ralph E. Johnson / John Vlissides',
62-
'publisher': {
63-
'name': 'Addison-Wesley',
64-
'url': 'http://www.addison-wesley.de/'
65-
}
66-
};
67-
service.createBook(book)
68-
expect(service.staticBookData.length).toBe(4);
69-
}));
64+
});
7065
});
7166

7267
});

0 commit comments

Comments
 (0)