Delete() 개인적인 메소드

private Delete ( int id ) : void
id int
리턴 void
        // Fails when run in test suite, success when run separately
        public void Test3_Delete()
        {
            // Arrange
            var controller = new BlogController(_context);

            // Act
            var invalidStatusCode = controller.Delete(100000000);
            var validStatusCode   = controller.Delete(1);

            // Assert
            Assert.Equal(404, invalidStatusCode.StatusCode);
            Assert.Equal(200, validStatusCode.StatusCode);
        }
예제 #2
0
        public async void Delete_Test()
        {
            var res = await blogController.Delete(99);

            Assert.False(res.success);

            var data = res.response;

            Assert.Null(data);
        }
예제 #3
0
        public async void DeleteTest()
        {
            var res = await blogController.Delete(1);

            Assert.True(res.success);
        }