Example #1
0
        public void Or_Should_return_self()
        {
            using World world = new World();

            EntityRuleBuilder.EitherBuilder builder = world.GetEntities().WithEither <bool>();

            Check.That(builder.Or <bool>()).IsEqualTo(builder);

            builder = world.GetEntities().WithEither <bool>();

            Check.That(builder.Or <bool>()).IsEqualTo(builder);

            builder = world.GetEntities().WithoutEither <bool>();

            Check.That(builder.Or <bool>()).IsEqualTo(builder);

            builder = world.GetEntities().WhenAddedEither <bool>();

            Check.That(builder.Or <bool>()).IsEqualTo(builder);

            builder = world.GetEntities().WhenChangedEither <bool>();

            Check.That(builder.Or <bool>()).IsEqualTo(builder);

            builder = world.GetEntities().WhenRemovedEither <bool>();

            Check.That(builder.Or <bool>()).IsEqualTo(builder);
        }
Example #2
0
        public void WhenRemovedEither_Should_return_new_EitherBuilder()
        {
            using World world = new World();

            EntityRuleBuilder.EitherBuilder builder = world.GetEntities().WithEither <bool>();

            Check.That(builder.WhenRemovedEither <bool>()).IsNotEqualTo(builder);
        }