public void Should_be_enabled_to_be_enabled()
        {
            var level1 = FooIds.Toggle <Level1>();

            var level2 = FooIds.Dependent <Level2>(x => x.Upon(level1));

            Assert.IsFalse(level2.Enabled);

            level1.Enable();
            Assert.IsTrue(level2.Enabled);
        }
Exemple #2
0
        public void Should_allow_simple_creation_of_dependent_fooids()
        {
            FooId <A>       a = FooIds.Enabled <A>();
            FooId <B>       b = FooIds.Enabled <B>();
            ToggleFooId <C> c = FooIds.Toggle <C>();

            FooId <ABC> abc = FooIds.Dependent <ABC>(x => x.Upon(a, b, c));

            Assert.IsFalse(abc.Enabled);

            c.Enable();
            Assert.IsTrue(abc.Enabled);
        }