Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Add series issue 6 #81

Closed
wants to merge 68 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
0686385
Add new entity representing series of books.
kev711 Mar 11, 2021
c5d2ca8
Add new entity mapping series of books and books with a serial order …
kev711 Mar 11, 2021
3590469
Add bookSeriesMapping to Book
kev711 Mar 11, 2021
b8aed12
Add copyright text
kev711 Mar 14, 2021
e21db5a
Update BookSeries entity's member "seriesName"
kev711 Mar 14, 2021
75ccd9d
Update BookSeriesMapping entity - Unique constraint, Relationship fie…
kev711 Mar 14, 2021
e0718d1
Add tests for entities Book Series Mapping and Book Series.
kev711 Mar 14, 2021
2af638c
Add boilerplate code for entity repositories.
kev711 Mar 14, 2021
eee400e
Add repository methods for Book, BookSeriesMapping
kev711 Mar 21, 2021
370dc0b
Add test classes for BookSeries & BookSeriesMapping repository
kev711 Mar 21, 2021
d10d705
Add new tests for Book repository
kev711 Mar 21, 2021
8309e31
Update setup method to clear tables with Foreign Key dependencies first
kev711 Mar 21, 2021
fe14f80
Fix test issues due to merge
kev711 Mar 21, 2021
d238142
Remove wildcard imports & adhere to 100 char limit
knjk04 Mar 25, 2021
2208799
Extract create book code to method
knjk04 Mar 25, 2021
ca46272
Extract create book code to method
knjk04 Mar 25, 2021
8dc9835
Add missing copyright notice
knjk04 Mar 25, 2021
9b37d9d
Extract create book code to method
knjk04 Mar 25, 2021
d0cde5c
Find by title
knjk04 Mar 25, 2021
254c14b
Extract duplicate code to method
knjk04 Mar 25, 2021
c9cbb82
Add delete book mutation
knjk04 Mar 27, 2021
03299dd
Merge pull request #83 from Project-Books/delete-book-mutation-82
knjk04 Mar 27, 2021
1688866
Resolve for PR-81 comments
kev711 Mar 27, 2021
5ba90da
Add DDL for Flyway migration.
kev711 Mar 29, 2021
b9e9305
Add publisher entity
knjk04 Mar 30, 2021
071b289
Update expired Slack link
knjk04 Mar 30, 2021
cbf5b70
Add migrations
knjk04 Mar 30, 2021
88cec9c
Rename publisher_book foreign key constraints
knjk04 Mar 30, 2021
c7f17ff
Merge pull request #86 from Project-Books/publisher-entity-66
knjk04 Mar 30, 2021
67774cd
Update sample query
knjk04 Mar 30, 2021
f527576
Make the Author the owner side of the many-to-many relationship
knjk04 Mar 31, 2021
dae9e4b
Extract common create book code to new method
knjk04 Mar 31, 2021
59e45fc
Fix failing tests
knjk04 Mar 31, 2021
fba2ad4
Make Author take in a set of books
knjk04 Mar 31, 2021
20c7494
Add Author with an empty set in mutation
knjk04 Mar 31, 2021
8a875ab
Merge pull request #89 from Project-Books/author-owner-80
knjk04 Mar 31, 2021
9eabd49
Update sample query
knjk04 Mar 31, 2021
4fa6954
Add removeBooks() method
knjk04 Mar 31, 2021
15cdecc
Set ddl auto to create in dev setup
knjk04 Mar 31, 2021
caa2dad
Merge pull request #91 from Project-Books/fix-multiple-authors-saved-75
knjk04 Mar 31, 2021
ed1c2bd
Create stale.yml
knjk04 Mar 31, 2021
123b6f5
Merge pull request #96 from Project-Books/follow-up-pr-95
knjk04 Mar 31, 2021
ea26737
Remove publishername graphql file
knjk04 Mar 31, 2021
9fc3b12
Add missing Publisher schema file
knjk04 Mar 31, 2021
11057c4
Add new entity representing series of books.
kev711 Mar 11, 2021
a293078
Add new entity mapping series of books and books with a serial order …
kev711 Mar 11, 2021
11ff6e4
Rebase onto main
kev711 Mar 11, 2021
c3826fb
Add copyright text
kev711 Mar 14, 2021
ebebbd5
Update BookSeries entity's member "seriesName"
kev711 Mar 14, 2021
789e0bd
Update BookSeriesMapping entity - Unique constraint, Relationship fie…
kev711 Mar 14, 2021
58ebd53
Add tests for entities Book Series Mapping and Book Series.
kev711 Mar 14, 2021
89248b0
Add boilerplate code for entity repositories.
kev711 Mar 14, 2021
fe11c63
Add repository methods for Book, BookSeriesMapping
kev711 Mar 21, 2021
5b7dc1c
Add test classes for BookSeries & BookSeriesMapping repository
kev711 Mar 21, 2021
346f344
Rebase onto main
kev711 Mar 21, 2021
84a2e53
Update setup method to clear tables with Foreign Key dependencies first
kev711 Mar 21, 2021
42a6622
Fix test issues due to merge
kev711 Mar 21, 2021
a78fc25
Remove wildcard imports & adhere to 100 char limit
knjk04 Mar 25, 2021
b62559f
Extract create book code to method
knjk04 Mar 25, 2021
7863aad
Extract create book code to method
knjk04 Mar 25, 2021
4327b42
Add missing copyright notice
knjk04 Mar 25, 2021
06ec459
Extract create book code to method
knjk04 Mar 25, 2021
4866d66
Find by title
knjk04 Mar 25, 2021
bfcc19c
Extract duplicate code to method
knjk04 Mar 25, 2021
f4fedf8
Resolve for PR-81 comments
kev711 Mar 27, 2021
d76c2d5
Add DDL for Flyway migration.
kev711 Mar 29, 2021
e36fc6e
Update tests to new model
kev711 Apr 14, 2021
0e04fdb
Merge remote-tracking branch 'origin/add-series-issue-6' into add-ser…
kev711 Apr 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add missing copyright notice
knjk04 committed Mar 25, 2021
commit 8dc9835ad746aed92a400b5565080e934173d28c
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (C) 2021 Karan Kumar
*
* This program is free software: you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.

* This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.

* You should have received a copy of the GNU General Public License along with this program.
* If not, see <https://www.gnu.org/licenses/>.
*/

package com.karankumar.booksapi.repository;

import com.karankumar.booksapi.annotations.DataJpaIntegrationTest;
@@ -21,16 +36,18 @@

@DataJpaIntegrationTest
@DisplayName("BookSeriesMappingRepository should")
public class BookSeriesMappingRepositoryTest {
class BookSeriesMappingRepositoryTest {

private final BookRepository bookRepository;
private final AuthorRepository authorRepository;
private final BookSeriesRepository bookSeriesRepository;
private final BookSeriesMappingRepository bookSeriesMappingRepository;

@Autowired
BookSeriesMappingRepositoryTest(BookRepository bookRepository, AuthorRepository authorRepository,
BookSeriesRepository bookSeriesRepository, BookSeriesMappingRepository bookSeriesMappingRepository){
BookSeriesMappingRepositoryTest(BookRepository bookRepository,
AuthorRepository authorRepository,
BookSeriesRepository bookSeriesRepository,
BookSeriesMappingRepository bookSeriesMappingRepository) {

this.bookRepository = bookRepository;
this.authorRepository = authorRepository;
@@ -48,8 +65,7 @@ void setUp() {

@Test
@DisplayName("return all books in a series.")
void fetchAllBooksInBookSeries(){

void fetchAllBooksInBookSeries() {
BookSeries bs = createBookSeriesMapping();
List<Book> assertion = bookSeriesMappingRepository.getAllBooksByBookSeries(bs);

@@ -60,7 +76,7 @@ void fetchAllBooksInBookSeries(){
assertThat(assertion).hasSize(bookList.size()).hasSameElementsAs(bookList);
}

private BookSeries createBookSeriesMapping(){
private BookSeries createBookSeriesMapping() {

Author author = new Author("J.K. Rowling");
author.setAbout("A fantastic author");