public void DeviceCalibrator_GetCalibrationValue_Succeeds() { DeviceCalibrator deviceCalibrator = new DeviceCalibrator(AllNumbersFilePath); int calibratedNumber = deviceCalibrator.GetCalibrationValue(0); Assert.Equal(31, calibratedNumber); }
private static void ExecuteDayOneCommand(string filePath) { DeviceCalibrator deviceCalibrator = new DeviceCalibrator(filePath); Out.WriteLine($"Device calibration value: {deviceCalibrator.GetCalibrationValue(0)}"); Out.WriteLine($"First repeated sum: {deviceCalibrator.GetFirstRepeatedSum()}"); }
public void DeviceCalibrator_GetCalibrationValue_FormatExceptionThrown() { DeviceCalibrator deviceCalibrator = new DeviceCalibrator(ContainsLettersFilePath); Assert.Throws <FormatException>(() => deviceCalibrator.GetCalibrationValue(0)); }