Example #1
0
        public async Task BlockConditionCreation_ReturnsConflictResponse_GivenExistingId()
        {
            //Arrange
            Guid id = new Guid("64dc0403-db60-479a-bce4-8662e3a16e55");

            _mockConditionService.Setup(c => c.ConditionExists(It.IsAny <Guid>())).ReturnsAsync(true);

            //Act
            var response = await _controller.BlockConditionCreation(id) as StatusCodeResult;

            //Assert
            Assert.Equal(StatusCodes.Status409Conflict, response.StatusCode);
            _mockConditionService.Verify(c => c.ConditionExists(id));
        }