43
43
import static org .fest .assertions .api .Assertions .assertThat ;
44
44
45
45
import ru .mystamps .web .dao .CountryDao ;
46
- import ru .mystamps .web .dao .GibbonsCatalogDao ;
47
- import ru .mystamps .web .dao .MichelCatalogDao ;
48
- import ru .mystamps .web .dao .ScottCatalogDao ;
49
46
import ru .mystamps .web .dao .SeriesDao ;
50
- import ru .mystamps .web .dao .YvertCatalogDao ;
51
47
import ru .mystamps .web .entity .Country ;
52
48
import ru .mystamps .web .entity .GibbonsCatalog ;
53
49
import ru .mystamps .web .entity .MetaInfo ;
@@ -65,18 +61,6 @@ public class SeriesServiceTest {
65
61
@ Mock
66
62
private CountryDao countryDao ;
67
63
68
- @ Mock
69
- private MichelCatalogDao michelCatalogDao ;
70
-
71
- @ Mock
72
- private ScottCatalogDao scottCatalogDao ;
73
-
74
- @ Mock
75
- private YvertCatalogDao yvertCatalogDao ;
76
-
77
- @ Mock
78
- private GibbonsCatalogDao gibbonsCatalogDao ;
79
-
80
64
@ Mock
81
65
private ImageService imageService ;
82
66
@@ -89,18 +73,6 @@ public class SeriesServiceTest {
89
73
@ Captor
90
74
private ArgumentCaptor <Series > seriesCaptor ;
91
75
92
- @ Captor
93
- private ArgumentCaptor <Set <MichelCatalog >> michelCatalogCaptor ;
94
-
95
- @ Captor
96
- private ArgumentCaptor <Set <ScottCatalog >> scottCatalogCaptor ;
97
-
98
- @ Captor
99
- private ArgumentCaptor <Set <YvertCatalog >> yvertCatalogCaptor ;
100
-
101
- @ Captor
102
- private ArgumentCaptor <Set <GibbonsCatalog >> gibbonsCatalogCaptor ;
103
-
104
76
@ Captor
105
77
private ArgumentCaptor <MultipartFile > multipartFileCaptor ;
106
78
@@ -221,20 +193,6 @@ public void addShouldPassNullToSeriesDaoIfMichelNumbersIsNull() {
221
193
assertThat (seriesCaptor .getValue ().getMichel ()).isNull ();
222
194
}
223
195
224
- @ Test
225
- public void addShouldSaveMichelNumbers () {
226
- Set <MichelCatalog > expectedNumbers = newSet (
227
- new MichelCatalog ("1" ),
228
- new MichelCatalog ("2" )
229
- );
230
- form .setMichelNumbers (StringUtils .join (expectedNumbers , ',' ));
231
-
232
- service .add (form , user );
233
-
234
- verify (michelCatalogDao ).save (michelCatalogCaptor .capture ());
235
- assertThat (michelCatalogCaptor .getValue ()).isEqualTo (expectedNumbers );
236
- }
237
-
238
196
@ Test
239
197
public void addShouldPassMichelNumbersToSeriesDao () {
240
198
Set <MichelCatalog > expectedNumbers = newSet (
@@ -260,20 +218,6 @@ public void addShouldPassNullToSeriesDaoIfScottNumbersIsNull() {
260
218
assertThat (seriesCaptor .getValue ().getScott ()).isNull ();
261
219
}
262
220
263
- @ Test
264
- public void addShouldSaveScottNumbers () {
265
- Set <ScottCatalog > expectedNumbers = newSet (
266
- new ScottCatalog ("1" ),
267
- new ScottCatalog ("2" )
268
- );
269
- form .setScottNumbers (StringUtils .join (expectedNumbers , ',' ));
270
-
271
- service .add (form , user );
272
-
273
- verify (scottCatalogDao ).save (scottCatalogCaptor .capture ());
274
- assertThat (scottCatalogCaptor .getValue ()).isEqualTo (expectedNumbers );
275
- }
276
-
277
221
@ Test
278
222
public void addShouldPassScottNumbersToSeriesDao () {
279
223
Set <ScottCatalog > expectedNumbers = newSet (
@@ -299,20 +243,6 @@ public void addShouldPassNullToSeriesDaoIfYvertNumbersIsNull() {
299
243
assertThat (seriesCaptor .getValue ().getYvert ()).isNull ();
300
244
}
301
245
302
- @ Test
303
- public void addShouldSaveYvertNumbers () {
304
- Set <YvertCatalog > expectedNumbers = newSet (
305
- new YvertCatalog ("1" ),
306
- new YvertCatalog ("2" )
307
- );
308
- form .setYvertNumbers (StringUtils .join (expectedNumbers , ',' ));
309
-
310
- service .add (form , user );
311
-
312
- verify (yvertCatalogDao ).save (yvertCatalogCaptor .capture ());
313
- assertThat (yvertCatalogCaptor .getValue ()).isEqualTo (expectedNumbers );
314
- }
315
-
316
246
@ Test
317
247
public void addShouldPassYvertNumbersToSeriesDao () {
318
248
Set <YvertCatalog > expectedNumbers = newSet (
@@ -338,20 +268,6 @@ public void addShouldPassNullToSeriesDaoIfGibbonsNumbersIsNull() {
338
268
assertThat (seriesCaptor .getValue ().getGibbons ()).isNull ();
339
269
}
340
270
341
- @ Test
342
- public void addShouldSaveGibbonsNumbers () {
343
- Set <GibbonsCatalog > expectedNumbers = newSet (
344
- new GibbonsCatalog ("1" ),
345
- new GibbonsCatalog ("2" )
346
- );
347
- form .setGibbonsNumbers (StringUtils .join (expectedNumbers , ',' ));
348
-
349
- service .add (form , user );
350
-
351
- verify (gibbonsCatalogDao ).save (gibbonsCatalogCaptor .capture ());
352
- assertThat (gibbonsCatalogCaptor .getValue ()).isEqualTo (expectedNumbers );
353
- }
354
-
355
271
@ Test
356
272
public void addShouldPassGibbonsNumbersToSeriesDao () {
357
273
Set <GibbonsCatalog > expectedNumbers = newSet (
0 commit comments