-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests for a Book functionality
- Loading branch information
1 parent
fb12b07
commit e414a55
Showing
15 changed files
with
1,291 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
src/main/java/mate/academy/dto/book/BookSearchParametersDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
package mate.academy.dto.book; | ||
|
||
public record BookSearchParametersDto( | ||
String title, | ||
String author, | ||
String isbn, | ||
String price) { | ||
import lombok.Data; | ||
|
||
@Data | ||
public class BookSearchParametersDto { | ||
private String title; | ||
private String author; | ||
private String isbn; | ||
private String price; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
package mate.academy.dto.category; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import lombok.Data; | ||
|
||
public record CategoryDto(@NotBlank(message = "name cannot be blank") String name, | ||
@NotBlank(message = "description cannot be blank") | ||
String description) { | ||
@Data | ||
public class CategoryDto { | ||
@NotBlank(message = "name cannot be blank") | ||
private String name; | ||
|
||
@NotBlank(message = "description cannot be blank") | ||
private String description; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package mate.academy.constans; | ||
|
||
public class Constants { | ||
public static final String USER = "user"; | ||
public static final String ADMIN = "admin"; | ||
public static final String ADMIN_ROLE = "ADMIN"; | ||
public static final String BASE_CATEGORY_URL = "/categories"; | ||
public static final String CATEGORY_BY_ID_URL = BASE_CATEGORY_URL + "/{id}"; | ||
public static final String CATEGORY_BOOKS_URL = CATEGORY_BY_ID_URL + "/books"; | ||
public static final String BASE_BOOK_URL = "/books"; | ||
public static final String BOOK_BY_ID_URL = BASE_BOOK_URL + "/{id}"; | ||
public static final String BOOK_SEARCH_URL = BASE_BOOK_URL + "/search"; | ||
} |
Oops, something went wrong.