public void ShootingTurkeyAfterQueries3()
        {
            var world    = CreateITWorld();
            var scenario = new Scenario();

            scenario.AddScenarioStep(new ScenarioStep(entice, Bill));
            var q1 = new AfterScenarioAlwaysQuery(new True(), walking, scenario);
            var q2 = new AfterScenarioEverQuery(new True(), walking, scenario);
            var q3 = new AfterScenarioTypicallyQuery(new True(), walking, scenario);

            Assert.AreEqual(q1.Evaluate(world), true);
            Assert.AreEqual(q2.Evaluate(world), true);
            Assert.AreEqual(q3.Evaluate(world), true);
        }
        public void ShootingTurkeyAfterQueries1()
        {
            var world    = CreateITWorld();
            var scenario = new Scenario();

            scenario.AddScenarioStep(new ScenarioStep(load, Bill));
            var q1 = new AfterScenarioAlwaysQuery(new True(), loaded, scenario);
            var q2 = new AfterScenarioEverQuery(new True(), loaded, scenario);
            var q3 = new AfterScenarioTypicallyQuery(new True(), loaded, scenario);

            Assert.AreEqual(q1.Evaluate(world), true); // all queries should return true!
            Assert.AreEqual(q2.Evaluate(world), true);
            Assert.AreEqual(q3.Evaluate(world), true);
        }
        public void ShootingTurkeyAfterQueries2()
        {
            var world    = CreateITWorld();
            var scenario = new Scenario();

            scenario.AddScenarioStep(new ScenarioStep(load, Bill));
            scenario.AddScenarioStep(new ScenarioStep(shoot, Bill));
            var q1 = new AfterScenarioAlwaysQuery(new True(), new Negation(alive), scenario);
            var q2 = new AfterScenarioEverQuery(new True(), new Negation(alive), scenario);
            var q3 = new AfterScenarioTypicallyQuery(new True(), new Negation(alive), scenario);

            Assert.AreEqual(q1.Evaluate(world), false);
            Assert.AreEqual(q2.Evaluate(world), true);
            Assert.AreEqual(q3.Evaluate(world), true);
        }
        public void EverAfterQuery()
        {
            world = CreateITWorld();

            var sc1 = new Scenario();

            sc1.AddScenarioStep(new ScenarioStep(eat, alice));
            var q1 = new AfterScenarioEverQuery(new True(), cakeExists, sc1);

            var sc2 = new Scenario();

            sc2.AddScenarioStep(new ScenarioStep(drink, alice));
            var q2 = new AfterScenarioEverQuery(new True(), new Negation(elixirExists), sc2);


            var r1 = q1.Evaluate(world);
            var r2 = q2.Evaluate(world);

            Assert.AreEqual(r1, false);
            Assert.AreEqual(r2, true);
        }