Exemple #1
0
        public void Delete()
        {
            _repository.Setup(r => r.Contains(1)).Returns(true);
            _repository.Setup(r => r.Delete(1));

            var response = _controller.Delete(1) as NoContentResult;

            Assert.Equal(204, response.StatusCode);
            _operationCounter.Verify(oc => oc.Increment(TrackedOperation.Delete), Once);
        }
Exemple #2
0
        public void Delete()
        {
            _repository.Setup(r => r.Contains(1)).Returns(true);
            _repository.Setup(r => r.Delete(1));

            var response = _controller.Delete(1);

            Assert.IsType <NoContentResult>(response);

            var typedResponse = response as NoContentResult;

            Assert.Equal(204, typedResponse.StatusCode);
        }
Exemple #3
0
        public void Delete()
        {
            _repository.Setup(r => r.Contains(1)).Returns(true);
            _repository.Setup(r => r.Delete(1));

            var response = _controller.Delete(1);

            Assert.IsType <NoContentResult>(response);

            var typedResponse = response as NoContentResult;

            Assert.Equal(204, typedResponse.StatusCode);
            _operationTimeEntry.Verify(ot => ot.Increment(TrackedOperation.Delete), Times.Once);
        }