Exemplo n.º 1
0
        public void CheckConditionAtTimeNoTimeQueryResultUndefined()
        {
            const int Time = 0;

            _query = new ConditionAtTimeQuery(QuestionType.Ever, "aa && bb");
            var state      = new State();
            var fluentList = new List <Fluent>
            {
                new Fluent("aa", true),
                new Fluent("bb", false)
            };

            state.Fluents.AddRange(fluentList);

            QueryResult result = _query.CheckCondition(state, null, Time);

            Assert.AreEqual(QueryResult.Undefined, result);
        }
Exemplo n.º 2
0
        public void CheckConditionAtTimeAfterTimeTrue()
        {
            const int Time = 10;

            _query = new ConditionAtTimeQuery(QuestionType.Ever, "aa && bb", Time - 1);
            var state      = new State();
            var fluentList = new List <Fluent>
            {
                new Fluent("aa", true),
                new Fluent("bb", true)
            };

            state.Fluents.AddRange(fluentList);

            QueryResult result = _query.CheckCondition(state, null, Time);

            Assert.AreEqual(QueryResult.True, result);
        }