Ejemplo n.º 1
0
        public void SuccessfullyAddSolutions()
        {
            // Arrange

            // Act
            var result     = sutSuccess.AddSolutions(addSolutionRequest);
            var message    = ((BaseResult)((OkObjectResult)result.Result).Value).Message;
            var statusCode = ((OkObjectResult)result.Result).StatusCode;

            // Assert
            Assert.That(result.Result, Is.InstanceOf <ActionResult>());
            Assert.That(message, Is.EqualTo("Status Code 200: Solutions Added"));
            Assert.That(statusCode, Is.EqualTo(200));
        }
Ejemplo n.º 2
0
        public void IssueErrorAndMessageShouldAddSolutionsFail()
        {
            // Arrange

            // Act
            var result     = sutFailure.AddSolutions(addSolutionRequest);
            var message    = ((BaseResult)((NotFoundObjectResult)result.Result).Value).Message;
            var statusCode = ((NotFoundObjectResult)result.Result).StatusCode;

            // Assert
            Assert.That(result.Result, Is.InstanceOf <ActionResult>());
            Assert.That(message, Is.EqualTo("Status Code 404: Solutions not Added"));
            Assert.That(statusCode, Is.EqualTo(404));
        }