public void Test_Initialize_StrategiesLoaded()
        {
            StrategyInitializer initializer = new StrategyInitializer();

            IStrategy    strategy = new MockActionStrategy();
            StrategyInfo info     = StrategyInfo.ExtractInfo(strategy.GetType())[0];

            StrategyInfo[] strategies = new StrategyInfo[] { info };

            StrategySaver saver = new StrategySaver();

            saver.FileNamer = initializer.FileNamer;

            saver.SaveToFile(new StrategyInfo[] { info });

            initializer.Initialize();

            Assert.IsTrue(StrategyState.IsInitialized, "Strategies weren't initialized or initialization wasn't detected.");
            Assert.Greater(StrategyState.Strategies.Count, 0, "Invalid number of strategies initialized.");


            StrategyInfo foundInfo = StrategyState.Strategies[info.Action, info.TypeName];

            Assert.IsNotNull(foundInfo, "The module info wasn't found.");
        }
        static public MockActionStrategy New(bool requiresAuthorisation)
        {
            MockActionStrategy strategy = new MockActionStrategy();

            strategy.RequireAuthorisation = requiresAuthorisation;

            StrategyState
            .Strategies
            .Creator
            .AttachReactions("MockAction", strategy);

            return(strategy);
        }
        public static MockActionStrategy New(bool requiresAuthorisation)
        {
            MockActionStrategy strategy = new MockActionStrategy();

            strategy.RequireAuthorisation = requiresAuthorisation;

            StrategyState
                .Strategies
                .Creator
                .AttachReactions("MockAction", strategy);

            return strategy;
        }
        public void Test_Initialize_StrategiesLoaded()
        {
            StrategyInitializer initializer = new StrategyInitializer();

            IStrategy strategy = new MockActionStrategy();
            StrategyInfo info = StrategyInfo.ExtractInfo(strategy.GetType())[0];

            StrategyInfo[] strategies = new StrategyInfo[]{info};

            StrategySaver saver = new StrategySaver();
            saver.FileNamer = initializer.FileNamer;

            saver.SaveToFile(new StrategyInfo[]{info});

            initializer.Initialize();

            Assert.IsTrue(StrategyState.IsInitialized, "Strategies weren't initialized or initialization wasn't detected.");
            Assert.Greater(StrategyState.Strategies.Count, 0, "Invalid number of strategies initialized.");

            StrategyInfo foundInfo = StrategyState.Strategies[info.Action, info.TypeName];

            Assert.IsNotNull(foundInfo, "The module info wasn't found.");
        }