public static HoldingsDistribution GetDistribution(HoldingDistributionType distributionType)
 {
     switch (distributionType)
     {
         case HoldingDistributionType.Good:
             return GetGoodDistributionHoldings();
         case HoldingDistributionType.Bad:
             return GetBadDistributionHoldings();
         case HoldingDistributionType.Extreme:
             return GetExtremeDistributionHoldings();
         case HoldingDistributionType.Empty:
             return GetEmptyDistributionHoldings();
         default:
             throw new ArgumentOutOfRangeException("distributionType", distributionType, null);
     }
 }
Exemple #2
0
 private static void TestAllocations(HoldingDistributionType distributionType, HoldingsPercentageCalculator calculator)
 {
     var holdings = HoldingsDistributionFactory.GetDistribution(distributionType);
     var percentageHoldings = calculator.CalculatePercentages(holdings.Holdings);
     PrintResults(holdings, percentageHoldings);
 }