// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 using System; using System.Collections.Generic; using System.Linq; namespace AWS.Deploy.Orchestration.RecommendationEngine { public class RecommendationTestFactory { public static IDictionary LoadAvailableTests() { return typeof(BaseRecommendationTest) .Assembly .GetTypes() .Where(x => !x.IsAbstract && x.IsSubclassOf(typeof(BaseRecommendationTest))) .Select(x => Activator.CreateInstance(x) as BaseRecommendationTest) .Where(x => x != null) .Select(x => x!) .ToDictionary(x => x.Name); } } }