Exemple #1
0
        public void GetCurrentMode_can_be_injected_outside_if_condition_is_single()
        {
            RegistryModeFactory.ClearConditions();
            RegistryModeFactory.AddCondition(() => RegistryMode.Release);

            var mode = RegistryModeFactory.GetCurrentMode();

            Assert.Equal(RegistryMode.Release, mode);
        }
        public void GetCurrentMode_can_be_injected_outside_if_condition_are_multiple()
        {
            RegistryModeFactory.ClearConditions();
            RegistryModeFactory.AddCondition(() => RegistryMode.Release);
            RegistryModeFactory.AddCondition(() => RegistryMode.Live);

            var mode = RegistryModeFactory.GetCurrentMode();

            Console.WriteLine(mode);
            Assert.Equal(RegistryMode.Release | RegistryMode.Live, mode);
        }