@@ -439,31 +439,31 @@ class SeriesServiceImplTest extends Specification {
439
439
440
440
def ' addComment() should throw exception when series id is null' () {
441
441
when :
442
- service. addComment(null , null , Random . userId())
442
+ service. addComment(null , Random . userId(), ' text ' )
443
443
then :
444
444
IllegalArgumentException ex = thrown()
445
445
ex. message == ' Series id must be non null'
446
446
}
447
447
448
448
def ' addComment() should throw exception when comment is null' () {
449
449
when :
450
- service. addComment(Random . id(), null , Random . userId())
450
+ service. addComment(Random . id(), Random . userId(), null )
451
451
then :
452
452
IllegalArgumentException ex = thrown()
453
453
ex. message == ' Comment must be non null'
454
454
}
455
455
456
456
def ' addComment() should throw exception when comment is empty or blank' () {
457
457
when :
458
- service. addComment(Random . id(), sample(' ' , ' ' ), Random . userId( ))
458
+ service. addComment(Random . id(), Random . userId(), sample(' ' , ' ' ))
459
459
then :
460
460
IllegalArgumentException ex = thrown()
461
461
ex. message == ' Comment must be non empty'
462
462
}
463
463
464
464
def ' addComment() should throw exception when user id is null' () {
465
465
when :
466
- service. addComment(Random . id(), ' a comment' , null )
466
+ service. addComment(Random . id(), null , ' a comment' )
467
467
then :
468
468
IllegalArgumentException ex = thrown()
469
469
ex. message == ' User id must be non null'
@@ -476,7 +476,7 @@ class SeriesServiceImplTest extends Specification {
476
476
Integer expectedUserId = Random . userId()
477
477
String expectedComment = ' this is important'
478
478
when :
479
- service. addComment(expectedSeriesId, expectedComment, expectedUserId )
479
+ service. addComment(expectedSeriesId, expectedUserId, expectedComment )
480
480
then :
481
481
1 * seriesDao. addComment({ AddCommentDbDto dto ->
482
482
assert dto?. seriesId == expectedSeriesId
0 commit comments