public void GivenLengthUnitData_WhenComparison_PassResult() { try { var controller = new MeasurementController(quantityMeasurementBL); var result = new Compare { MeasurementType = "length", First_Value_Unit = "FeetToInch", First_Value = 3, Second_Value_Unit = "YardToInch", Second_Value = 1, }; var okResult = controller.AddComparedValue(result); Assert.IsType <OkObjectResult>(okResult); } catch (Exception e) { throw new Exception(e.Message); } }