コード例 #1
0
        public void DeleteEnvironmentId_ShouldCallService_AndReturn200()
        {
            _serviceMock.Setup(x => x.Delete(1));

            var result = _controller.DeleteEnvironmentId(1);

            _serviceMock.Verify(x => x.Delete(1), Times.Once);

            var objectResult = Assert.IsType <OkResult>(result);

            Assert.Equal(200, objectResult.StatusCode);
        }