public void RunTestbench_NoParams_DoesOneRun() { int expectedResult = 1; ArrayCompare.Init(); ArrayCompare.RunTestbench(); int measurements = ArrayCompare.algorithmPerformances.Count; Assert.AreEqual(expectedResult, measurements); }
public void CalculateAlgorithmAveragePerformances_AfterRunTestbench_CalculatesRightAverage() { ArrayCompare.Init(); ArrayCompare.RunTestbench(); long expectedResult = 0; int measurements = ArrayCompare.algorithmPerformances.Count; for (int i = 0; i < measurements; i++) { expectedResult += ArrayCompare.algorithmPerformances[i][0].ticksElapsed[0]; } expectedResult /= measurements; Assert.AreEqual(expectedResult, ArrayCompare.algorithmPerformancesAverage[0].ticksElapsed[0]); }