Пример #1
0
        public void ShouldReturnBaseServiceResultSuccess()
        {
            BaseServiceResult result = TestedController.Delete(It.IsAny <Guid>());

            Assert.NotNull(result);
            Assert.True(result.IsSuccess);
            Assert.Empty(result.ErrorMessage);
        }
        public void DeleteTest()
        {
            var postCategoryID = "TestPostCategoryID";

            var postCategory = new PostCategory();
            postCategory.ID = postCategoryID;


            _postCategoryRepositoryMock.Expect(r => r.Get(postCategoryID)).Return(postCategory);


            var result = TestedController.Delete(postCategoryID);


            VerifyViewResult(result, "ConfirmDelete", typeof(PostCategory), postCategory);
        }
Пример #3
0
 public void ShouldReturnBaseServiceResultError()
 {
     AssertBaseServiceResultError(() => TestedController.Delete(It.IsAny <Guid>()));
 }