Browse Source

Fix tests for the CMS Kit.

pull/5163/head
Halil İbrahim Kalkan 6 years ago
parent
commit
e4fcb11872
  1. 16
      modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentPublicAppService_Tests.cs
  2. 22
      modules/cms-kit/test/Volo.CmsKit.Application.Tests/Reactions/ReactionPublicAppService_Tests.cs

16
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 =>
{

22
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 =>
{

Loading…
Cancel
Save