public void ShouldReturnCorrectReturnTypeOnTriangleType() { var controller = new TriangleTypeController(); var response = controller.TriangleType(1, 2, 3); Assert.IsInstanceOfType(response, typeof(ObjectResult)); var result = response as ObjectResult; Assert.IsNotNull(result); }
public void ShouldReturnStatus200OnTriangleType() { var controller = new TriangleTypeController(); var response = controller.TriangleType(1, 2, 3); Assert.IsInstanceOfType(response, typeof(ObjectResult)); var result = response as ObjectResult; Assert.IsNotNull(result); Assert.AreEqual(200, result.StatusCode); }
public void ShouldReturnErrorOnTriangleTypeIfinequality() { var controller = new TriangleTypeController(); var response = controller.TriangleType(100, 10, 1); Assert.IsInstanceOfType(response, typeof(ObjectResult)); var result = response as ObjectResult; Assert.IsNotNull(result); Assert.AreEqual(200, result.StatusCode); Assert.AreEqual("Error", result.Value); }