Beispiel #1
0
        public async Task DeleteAdminUserAsyncTest()
        {
            _mock.Setup(p => p.DeleteAdminUserAsync(GetTestAdminDeleteDto()));
            var controller   = new AdminUserController(_mock.Object);
            var actionResult = await controller.DeleteAdminUserAsync(GetTestAdminDeleteDto());

            var contentResult = actionResult as OkNegotiatedContentResult <BaseApiResponse>;


            Assert.IsNotNull(actionResult);
            Assert.IsInstanceOfType(actionResult, typeof(IHttpActionResult));
            Assert.IsNotNull(contentResult);
            Assert.IsInstanceOfType(contentResult, typeof(OkNegotiatedContentResult <BaseApiResponse>));
            Assert.IsNotNull(contentResult.Content);
        }