File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
src/test/java/com/answerdigital/answerking/controller Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 44import com .answerdigital .answerking .request .CategoryRequest ;
55import com .answerdigital .answerking .response .CategoryResponse ;
66import com .answerdigital .answerking .response .ProductResponse ;
7+ import com .answerdigital .answerking .response .SimpleCategoryResponse ;
78import com .answerdigital .answerking .service .CategoryService ;
89import com .answerdigital .answerking .service .ProductService ;
910import com .fasterxml .jackson .databind .ObjectMapper ;
@@ -106,11 +107,10 @@ void addCategoryTest() throws Exception {
106107 void fetchProductsByCategoryTest () throws Exception {
107108 final ObjectMapper mapper = new ObjectMapper ();
108109
109- final var categoryResponse = CategoryResponse .builder ()
110+ final var categoryResponse = SimpleCategoryResponse .builder ()
110111 .id (22L )
111112 .name ("test" )
112113 .description ("testDesc" )
113- .products (List .of (33L ))
114114 .build ();
115115 final var productResponse = ProductResponse .builder ()
116116 .id (33L )
Original file line number Diff line number Diff line change 11package com .answerdigital .answerking .controller ;
22
3- import com .answerdigital .answerking .response .CategoryResponse ;
43import com .answerdigital .answerking .response .ProductResponse ;
4+ import com .answerdigital .answerking .response .SimpleCategoryResponse ;
55import com .answerdigital .answerking .service .ProductService ;
66import com .fasterxml .jackson .databind .ObjectMapper ;
77import org .junit .jupiter .api .BeforeEach ;
@@ -55,11 +55,10 @@ class ProductControllerTest {
5555
5656 @ BeforeEach
5757 public void generateProduct () {
58- final var categoryResponse = CategoryResponse .builder ()
58+ final var categoryResponse = SimpleCategoryResponse .builder ()
5959 .id (22L )
6060 .name ("test" )
6161 .description ("testDesc" )
62- .products (List .of (33L ))
6362 .build ();
6463 product = ProductResponse .builder ()
6564 .id (55L )
You can’t perform that action at this time.
0 commit comments