public void Remove_Fail() { var service = GetMockedAnimalService(); service.Setup(x => x.Delete(It.IsAny <Guid>())).Returns(new OperationResult(false, "Fail")); var controller = new AnimalsController(service.Object); var result = (OperationResult)controller.Remove(Guid.NewGuid().ToString()).Data; Assert.IsFalse(result.Success); Assert.IsNotEmpty(result.Message); }