From e4fcb118723bdfc6656e90e8e41fdee4765b2216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sat, 15 Aug 2020 22:05:51 +0300 Subject: [PATCH] Fix tests for the CMS Kit. --- .../Comments/CommentPublicAppService_Tests.cs | 16 ++++++++------ .../ReactionPublicAppService_Tests.cs | 22 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentPublicAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentPublicAppService_Tests.cs index ded505dcaf..ada9805a51 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentPublicAppService_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentPublicAppService_Tests.cs @@ -41,13 +41,15 @@ namespace Volo.CmsKit.Comments { _currentUser.Id.Returns(_cmsKitTestData.User2Id); - var newComment = await _commentAppService.CreateAsync(new CreateCommentInput - { - EntityId = _cmsKitTestData.EntityId1, - EntityType = _cmsKitTestData.EntityType1, - RepliedCommentId = null, - Text = "newComment" - }); + var newComment = await _commentAppService.CreateAsync( + _cmsKitTestData.EntityType1, + _cmsKitTestData.EntityId1, + new CreateCommentInput + { + RepliedCommentId = null, + Text = "newComment" + } + ); UsingDbContext(context => { diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Reactions/ReactionPublicAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Reactions/ReactionPublicAppService_Tests.cs index 615003efec..3872861ef7 100644 --- a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Reactions/ReactionPublicAppService_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Reactions/ReactionPublicAppService_Tests.cs @@ -57,12 +57,11 @@ namespace Volo.CmsKit.Reactions { _currentUser.Id.Returns(_cmsKitTestData.User1Id); - await _reactionPublicAppService.CreateAsync(new CreateReactionDto - { - EntityType = _cmsKitTestData.EntityType2, - EntityId = _cmsKitTestData.EntityId2, - ReactionName = StandardReactions.Hooray - }); + await _reactionPublicAppService.CreateAsync( + _cmsKitTestData.EntityType2, + _cmsKitTestData.EntityId2, + StandardReactions.Hooray + ); UsingDbContext(context => { @@ -81,12 +80,11 @@ namespace Volo.CmsKit.Reactions { _currentUser.Id.Returns(_cmsKitTestData.User1Id); - await _reactionPublicAppService.DeleteAsync(new DeleteReactionDto - { - EntityType = _cmsKitTestData.EntityType1, - EntityId = _cmsKitTestData.EntityId1, - ReactionName = StandardReactions.Confused - }); + await _reactionPublicAppService.DeleteAsync( + _cmsKitTestData.EntityType1, + _cmsKitTestData.EntityId1, + StandardReactions.Confused + ); UsingDbContext(context => {