Beispiel #1
0
        private static TestCustomPlacementStrategy GetCustomPlacementStrategy(CustomPlacementScenario scenario)
        {
            switch (scenario)
            {
            case CustomPlacementScenario.FixedSilo:
                return(TestCustomPlacementStrategy.FixedSilo);

            case CustomPlacementScenario.ExcludeOne:
                return(TestCustomPlacementStrategy.ExcludeOne);

            case CustomPlacementScenario.RequestContextBased:
                return(TestCustomPlacementStrategy.RequestContextBased);

            default:
                throw new Exception("Unknown CustomPlacementScenario");
            }
        }
Beispiel #2
0
 internal TestCustomPlacementStrategy(CustomPlacementScenario scenario)
 {
     Scenario = scenario;
 }
Beispiel #3
0
 public TestPlacementStrategyAttribute(CustomPlacementScenario scenario) :
     base(GetCustomPlacementStrategy(scenario))
 {
     Scenario = scenario;
 }
Beispiel #4
0
 public TestPlacementStrategyAttribute(CustomPlacementScenario scenario) :
     base(scenario == CustomPlacementScenario.FixedSilo ? TestCustomPlacementStrategy.FixedSilo : TestCustomPlacementStrategy.ExcludeOne)
 {
     Scenario = scenario;
 }