public void CalculateMedianValue_NotReady_TrowException() { var dataColumn = "Data Value"; var dateTimeStampColumn = "Date/Time"; var processor = new MockingFileProcessor(dataColumn, dateTimeStampColumn); Assert.That(() => processor.CalculateMedianValue(), Throws.Exception.TypeOf <InvalidOperationException>()); }
public void CalculateMedianValue_Ready_MatchResult() { var dataColumn = "Data Value"; var dateTimeStampColumn = "Date/Time"; var file = GetTestingFileA(); var processor = new MockingFileProcessor(dataColumn, dateTimeStampColumn); processor.SetDataAndPrepareProcessing(file); var medianValue = processor.CalculateMedianValue(); decimal expected = (decimal)29.7125; Assert.AreEqual(medianValue, expected); }