Exemplo n.º 1
0
        public void testAddValue()
        {
            JDFIntegerRangeList integerList = new JDFIntegerRangeList("1 2 3 4 ~ 44");

            iState.setAllowedValueList(integerList);
            iState.addValue("24", EnumFitsValue.Allowed);
            Assert.AreEqual(integerList, iState.getAllowedValueList());
            iState.addValue("45", EnumFitsValue.Allowed);
            Assert.AreEqual(new JDFIntegerRangeList("1 ~ 45"), iState.getAllowedValueList());
            iState.addValue("48", EnumFitsValue.Allowed);
            Assert.AreEqual(new JDFIntegerRangeList("1 ~ 45 48"), iState.getAllowedValueList());
            iState.addValue("49", EnumFitsValue.Present);
            Assert.AreEqual(new JDFIntegerRangeList("49"), iState.getPresentValueList());
        }