public void Constructor_ExpectedValues() { // Call var reliabilityIndexCalculationOutput = new ReliabilityIndexCalculationOutput(1.1, 2.2); // Assert Assert.AreEqual(1.1, reliabilityIndexCalculationOutput.Result); Assert.AreEqual(2.2, reliabilityIndexCalculationOutput.CalculatedReliabilityIndex); }
/// <summary> /// Reads the <paramref name="result"/>. /// </summary> /// <param name="result">The result from the database read.</param> /// <exception cref="HydraRingFileParserException">Thrown when the result /// cannot be converted to the output format.</exception> private void ReadResult(IDictionary <string, object> result) { try { Output = new ReliabilityIndexCalculationOutput( Convert.ToDouble(result[valueColumnName]), Convert.ToDouble(result[betaColumnName])); } catch (InvalidCastException e) { throw new HydraRingFileParserException(Resources.ReliabilityIndexCalculationParser_No_reliability_found_in_output_file, e); } }