public void Calculate_OneElementInEquity__EmptyResult() { CheckForEmpty(EquityDistributionCalculator.Calculate(new List <SystemValue>() { new SystemValue() })); }
public void Calculate__CalculateCorrectly(float[] equityValues, float expectedAvg, float expectedStdDev) { var equity = equityValues.Select(v => new SystemValue() { Value = v }).ToList(); var result = EquityDistributionCalculator.Calculate(equity); result.Average.ToString("F6").ShouldBe(expectedAvg.ToString("F6")); result.StdDev.ToString("F6").ShouldBe(expectedStdDev.ToString("F6")); }
private static void CalculateEquityDistribution(SystemStateSummary summary, SystemState systemState) { summary.EquityDistribution = EquityDistributionCalculator.Calculate(systemState.Equity); }
public void Calculate_EmptyEquity__EmptyResult() { CheckForEmpty(EquityDistributionCalculator.Calculate(new List <SystemValue>())); }