File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
src/test/java/com/answerdigital/answerking/service Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 1616import org .junit .jupiter .api .BeforeEach ;
1717import org .junit .jupiter .api .Test ;
1818import org .junit .jupiter .api .extension .ExtendWith ;
19+ import org .mockito .InjectMocks ;
1920import org .mockito .Mock ;
2021import org .mockito .junit .jupiter .MockitoExtension ;
2122
3435@ ExtendWith (MockitoExtension .class )
3536final class CategoryServiceTest {
3637
38+ @ InjectMocks
3739 private CategoryService categoryService ;
3840
3941 @ Mock
@@ -56,16 +58,6 @@ private CategoryServiceTest() {
5658 productTestBuilder = new ProductTestBuilder ();
5759 }
5860
59- @ BeforeEach
60- void setUp () {
61- categoryService = new CategoryService (productService , categoryRepository );
62- }
63-
64- @ AfterEach
65- void tearDown () {
66- categoryService = null ;
67- }
68-
6961 @ Test
7062 void testAddCategory () {
7163 // given
You can’t perform that action at this time.
0 commit comments