use of com.google.example.library.v1.Book in project java_1_wednesday_2022 by AlexJavaGuru.
the class FindByTitleUIAction method execute.
@Override
public void execute() {
Scanner scanner = new Scanner(System.in);
System.out.println("Book's title: ");
String title = scanner.nextLine();
scanner.close();
List<Book> books = bookDatabase.findByTitle(title);
System.out.println(books);
}
use of com.google.example.library.v1.Book in project java_1_wednesday_2022 by AlexJavaGuru.
the class SearchCriteriaTest method testAuthorCriteria2.
private void testAuthorCriteria2() {
SearchCriteria searchCriteria = new AuthorSearchCriteria("1");
Book book = new Book("2", "1");
checkResult(!searchCriteria.test(book));
}
use of com.google.example.library.v1.Book in project java_1_wednesday_2022 by AlexJavaGuru.
the class SearchCriteriaTest method testTitleCriteria1.
private void testTitleCriteria1() {
SearchCriteria searchCriteria = new TitleSearchCriteria("1");
Book book = new Book("1", "1");
checkResult(searchCriteria.test(book));
}
use of com.google.example.library.v1.Book in project java_1_wednesday_2022 by AlexJavaGuru.
the class SearchCriteriaTest method testYearCriteria1.
private void testYearCriteria1() {
SearchCriteria searchCriteria = new YearOfIssueSearchCriteria("2000");
Book book = new Book("1", "1", "2000");
checkResult(searchCriteria.test(book));
}
use of com.google.example.library.v1.Book in project java_1_wednesday_2022 by AlexJavaGuru.
the class SearchCriteriaTest method testTitleCriteria2.
private void testTitleCriteria2() {
SearchCriteria searchCriteria = new TitleSearchCriteria("1");
Book book = new Book("1", "2");
checkResult(!searchCriteria.test(book));
}
Aggregations