示例#1
0
        public void RespondentFailsSingleTerm()
        {
            LinkedQuestion q = new LinkedQuestion();

            q.PreP = "Ask if AA001=1.";

            List <FilterInstruction> fl = new List <FilterInstruction>();

            FilterInstruction fi = new FilterInstruction()
            {
                VarName = "AA001",
                Oper    = Operation.Equals
            };

            fi.ValuesStr.Add("1");

            fl.Add(fi);

            q.FilterList.Add(fl);

            ITCLib.Respondent r = new ITCLib.Respondent();

            r.AddResponse("AA001", "2");


            Assert.IsFalse(r.RespondentSatisfiesFilter(fl));
        }
示例#2
0
        public void Respondent_SatisfiesSingleTerm()
        {
            List <FilterInstruction> fl = new List <FilterInstruction>();

            FilterInstruction fi = new FilterInstruction()
            {
                VarName = "AA001",
                Oper    = Operation.Equals
            };

            fi.ValuesStr.Add("1");

            fl.Add(fi);

            ITCLib.Respondent r = new ITCLib.Respondent();

            r.AddResponse("AA001", "1");


            Assert.IsTrue(r.RespondentSatisfiesFilter(fl));
        }