File tree Expand file tree Collapse file tree 14 files changed +58
-0
lines changed
java/api/src/test/java/com/exadel/frs/core/trainservice Expand file tree Collapse file tree 14 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 1010import com .exadel .frs .commonservice .sdk .faces .feign .dto .FindFacesResult ;
1111import com .exadel .frs .core .trainservice .DbHelper ;
1212import com .exadel .frs .core .trainservice .EmbeddedPostgreSQLTest ;
13+ import com .exadel .frs .core .trainservice .service .NotificationReceiverService ;
1314import org .apache .commons .lang3 .ArrayUtils ;
1415import org .junit .jupiter .api .Test ;
1516import org .springframework .beans .factory .annotation .Autowired ;
@@ -32,6 +33,9 @@ class MigrationComponentTest extends EmbeddedPostgreSQLTest {
3233 @ MockBean
3334 FacesFeignClient feignClient ;
3435
36+ @ MockBean
37+ NotificationReceiverService notificationReceiverService ;
38+
3539 @ Autowired
3640 MigrationComponent migrationComponent ;
3741
Original file line number Diff line number Diff line change 55import com .exadel .frs .core .trainservice .DbHelper ;
66import com .exadel .frs .core .trainservice .EmbeddedPostgreSQLTest ;
77import com .exadel .frs .core .trainservice .config .IntegrationTest ;
8+ import com .exadel .frs .core .trainservice .service .NotificationReceiverService ;
89import org .junit .jupiter .api .Test ;
910import org .springframework .beans .factory .annotation .Autowired ;
1011import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
@@ -31,6 +32,9 @@ class ConsistenceControllerTest extends EmbeddedPostgreSQLTest {
3132 @ MockBean
3233 FacesApiClient client ;
3334
35+ @ MockBean
36+ NotificationReceiverService notificationReceiverService ;
37+
3438 @ Test
3539 void shouldReturnStatusWithoutAuth () throws Exception {
3640 var currentCalculator = "currentCalculator" ;
Original file line number Diff line number Diff line change 2525import com .exadel .frs .core .trainservice .EmbeddedPostgreSQLTest ;
2626import com .exadel .frs .core .trainservice .config .IntegrationTest ;
2727import com .exadel .frs .core .trainservice .dto .Base64File ;
28+ import com .exadel .frs .core .trainservice .service .NotificationReceiverService ;
2829import com .exadel .frs .core .trainservice .validation .ImageExtensionValidator ;
2930import com .fasterxml .jackson .databind .ObjectMapper ;
3031import lombok .val ;
@@ -66,6 +67,9 @@ class DetectionControllerTest extends EmbeddedPostgreSQLTest {
6667 @ MockBean
6768 private FacesApiClient client ;
6869
70+ @ MockBean
71+ private NotificationReceiverService notificationReceiverService ;
72+
6973 @ Autowired
7074 private ObjectMapper objectMapper ;
7175
Original file line number Diff line number Diff line change 3333import com .exadel .frs .core .trainservice .dto .Base64File ;
3434import com .exadel .frs .core .trainservice .dto .FaceVerification ;
3535import com .exadel .frs .core .trainservice .service .EmbeddingService ;
36+ import com .exadel .frs .core .trainservice .service .NotificationReceiverService ;
3637import com .exadel .frs .core .trainservice .service .SubjectService ;
3738import com .exadel .frs .core .trainservice .validation .ImageExtensionValidator ;
3839import com .fasterxml .jackson .databind .ObjectMapper ;
@@ -99,6 +100,9 @@ class EmbeddingControllerTest extends EmbeddedPostgreSQLTest {
99100 @ MockBean
100101 FacesApiClient client ;
101102
103+ @ MockBean
104+ NotificationReceiverService notificationReceiverService ;
105+
102106 private static Pair <Subject , Embedding > pair () {
103107 Subject subject = new Subject ();
104108 subject .setId (UUID .randomUUID ());
Original file line number Diff line number Diff line change 2323import com .exadel .frs .core .trainservice .config .IntegrationTest ;
2424import com .exadel .frs .core .trainservice .dto .ModelValidationResult ;
2525import com .exadel .frs .core .trainservice .service .ModelService ;
26+ import com .exadel .frs .core .trainservice .service .NotificationReceiverService ;
2627import org .junit .jupiter .api .Test ;
2728import org .springframework .beans .factory .annotation .Autowired ;
2829import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
@@ -52,6 +53,9 @@ class MigrateControllerTest extends EmbeddedPostgreSQLTest {
5253 @ MockBean
5354 private ModelService modelService ;
5455
56+ @ MockBean
57+ private NotificationReceiverService notificationReceiverService ;
58+
5559 @ Test
5660 void migrate () throws Exception {
5761 var validationResult = new ModelValidationResult (1L , OK );
Original file line number Diff line number Diff line change 44import com .exadel .frs .core .trainservice .DbHelper ;
55import com .exadel .frs .core .trainservice .EmbeddedPostgreSQLTest ;
66import com .exadel .frs .core .trainservice .config .IntegrationTest ;
7+ import com .exadel .frs .core .trainservice .service .NotificationReceiverService ;
78import org .junit .jupiter .api .Test ;
89import org .springframework .beans .factory .annotation .Autowired ;
910import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
11+ import org .springframework .boot .test .mock .mockito .MockBean ;
1012import org .springframework .test .web .servlet .MockMvc ;
1113
1214import static com .exadel .frs .core .trainservice .system .global .Constants .API_V1 ;
@@ -27,6 +29,9 @@ class StaticControllerTest extends EmbeddedPostgreSQLTest {
2729 @ Autowired
2830 MockMvc mockMvc ;
2931
32+ @ MockBean
33+ NotificationReceiverService notificationReceiverService ;
34+
3035 @ Test
3136 void getImg () throws Exception {
3237 var model = dbHelper .insertModel ();
Original file line number Diff line number Diff line change 99import com .exadel .frs .core .trainservice .component .FaceClassifierPredictor ;
1010import com .exadel .frs .core .trainservice .config .IntegrationTest ;
1111import com .exadel .frs .core .trainservice .dto .VerifySourceTargetRequest ;
12+ import com .exadel .frs .core .trainservice .service .NotificationReceiverService ;
1213import com .exadel .frs .core .trainservice .validation .ImageExtensionValidator ;
1314import com .fasterxml .jackson .databind .ObjectMapper ;
1415import lombok .val ;
@@ -48,6 +49,9 @@ class VerifyControllerTest extends EmbeddedPostgreSQLTest {
4849 @ MockBean
4950 private FacesApiClient client ;
5051
52+ @ MockBean
53+ private NotificationReceiverService notificationReceiverService ;
54+
5155 @ Autowired
5256 private ObjectMapper objectMapper ;
5357
Original file line number Diff line number Diff line change 1010import com .exadel .frs .core .trainservice .DbHelper ;
1111import com .exadel .frs .core .trainservice .EmbeddedPostgreSQLTest ;
1212import com .exadel .frs .core .trainservice .dto .EmbeddingInfo ;
13+ import com .exadel .frs .core .trainservice .service .NotificationReceiverService ;
1314import org .apache .commons .lang3 .tuple .Pair ;
1415import org .junit .jupiter .api .Test ;
1516import org .junit .jupiter .api .TestInstance ;
1617import org .junit .jupiter .params .ParameterizedTest ;
1718import org .junit .jupiter .params .provider .Arguments ;
1819import org .junit .jupiter .params .provider .MethodSource ;
1920import org .springframework .beans .factory .annotation .Autowired ;
21+ import org .springframework .boot .test .mock .mockito .MockBean ;
2022import org .springframework .data .domain .Pageable ;
2123
2224import java .util .Optional ;
2931@ TestInstance (TestInstance .Lifecycle .PER_CLASS )
3032class SubjectDaoTest extends EmbeddedPostgreSQLTest {
3133
34+ @ MockBean
35+ NotificationReceiverService notificationReceiverService ;
36+
3237 @ Autowired
3338 DbHelper dbHelper ;
3439
Original file line number Diff line number Diff line change 55import com .exadel .frs .commonservice .repository .EmbeddingRepository ;
66import com .exadel .frs .core .trainservice .DbHelper ;
77import com .exadel .frs .core .trainservice .EmbeddedPostgreSQLTest ;
8+ import com .exadel .frs .core .trainservice .service .NotificationReceiverService ;
89import com .exadel .frs .core .trainservice .system .global .Constants ;
910import org .junit .jupiter .api .Test ;
1011import org .springframework .beans .factory .annotation .Autowired ;
12+ import org .springframework .boot .test .mock .mockito .MockBean ;
1113import org .springframework .data .domain .Pageable ;
1214
1315import javax .transaction .Transactional ;
1921
2022class EmbeddingRepositoryTest extends EmbeddedPostgreSQLTest {
2123
24+ @ MockBean
25+ NotificationReceiverService notificationReceiverService ;
26+
2227 @ Autowired
2328 DbHelper dbHelper ;
2429
Original file line number Diff line number Diff line change 44import com .exadel .frs .commonservice .repository .SubjectRepository ;
55import com .exadel .frs .core .trainservice .DbHelper ;
66import com .exadel .frs .core .trainservice .EmbeddedPostgreSQLTest ;
7+ import com .exadel .frs .core .trainservice .service .NotificationReceiverService ;
78import org .junit .jupiter .api .Test ;
89import org .springframework .beans .factory .annotation .Autowired ;
910
1011import javax .transaction .Transactional ;
1112import java .util .List ;
1213import java .util .Optional ;
1314import java .util .UUID ;
15+ import org .springframework .boot .test .mock .mockito .MockBean ;
1416
1517import static org .assertj .core .api .Assertions .assertThat ;
1618
1719class SubjectRepositoryTest extends EmbeddedPostgreSQLTest {
1820
21+ @ MockBean
22+ NotificationReceiverService notificationReceiverService ;
23+
1924 @ Autowired
2025 DbHelper dbHelper ;
2126
You can’t perform that action at this time.
0 commit comments