1515class CustomProductRepositoryTest {
1616
1717 @ Autowired
18- private CustomProductRepository productAdapter ;
18+ private CustomProductRepository productRepository ;
1919
2020 @ Test
2121 void getLowRangeProducts () {
22- List <Product > products = productAdapter .getLowRangeProducts (List .of (Category .MOBILE , Category .TV_APPLIANCES ));
22+ List <Product > products = productRepository .getLowRangeProducts (List .of (Category .MOBILE , Category .TV_APPLIANCES ));
2323 assertEquals (2 , products .size ());
2424 }
2525
2626 @ Test
2727 void getPremiumProducts () {
28- List <Product > products = productAdapter .getPremiumProducts (List .of (Category .MEN_FASHION , Category .WOMEN_FASHION ));
28+ List <Product > products = productRepository .getPremiumProducts (List .of (Category .MEN_FASHION , Category .WOMEN_FASHION ));
2929 assertEquals (2 , products .size ());
3030 }
3131
3232 @ Test
3333 void testGetPremiumProducts () {
34- List <Product > products = productAdapter .getPremiumProducts ("jacket" , List .of (Category .MEN_FASHION ));
34+ List <Product > products = productRepository .getPremiumProducts ("jacket" , List .of (Category .MEN_FASHION ));
3535 assertEquals (2 , products .size ());
3636 }
3737
@@ -50,7 +50,7 @@ void testDynamicSpecification() {
5050 List <Filter > filters = new ArrayList <>();
5151 filters .add (nameLike );
5252 filters .add (categories );
53- List <Product > products = productAdapter .getQueryResult (filters );
53+ List <Product > products = productRepository .getQueryResult (filters );
5454 assertEquals (2 , products .size ());
5555
5656 Filter lowRange = Filter .builder ()
@@ -63,7 +63,7 @@ void testDynamicSpecification() {
6363 filters .add (lowRange );
6464 filters .add (categories );
6565
66- products = productAdapter .getQueryResult (filters );
66+ products = productRepository .getQueryResult (filters );
6767 assertEquals (2 , products .size ());
6868
6969 Filter priceEquals = Filter .builder ()
@@ -73,7 +73,7 @@ void testDynamicSpecification() {
7373 .build ();
7474 filters = new ArrayList <>();
7575 filters .add (priceEquals );
76- products = productAdapter .getQueryResult (filters );
76+ products = productRepository .getQueryResult (filters );
7777 assertEquals (1 , products .size ());
7878 }
7979}
0 commit comments