Ejemplo n.º 1
0
        public void ShouldGetInputsUsingLastCharValue()
        {
            ExceptTerminalsList predicate;

            IInput <char>[] inputs;

            predicate = new ExceptTerminalsList(char.MaxValue);
            inputs    = predicate.GetInputs().ToArray();
            Assert.IsNotNull(inputs);
            Assert.AreEqual(1, inputs.Length);
            Assert.AreEqual(char.MinValue, ((TerminalRangeInput)inputs[0]).FirstValue);
            Assert.AreEqual((char)65534, ((TerminalRangeInput)inputs[0]).LastValue);
        }
Ejemplo n.º 2
0
        public void ShouldGetInputs()
        {
            ExceptTerminalsList predicate;

            IInput <char>[] inputs;

            predicate = new ExceptTerminalsList('b', 'd');
            inputs    = predicate.GetInputs().ToArray();
            Assert.IsNotNull(inputs);
            Assert.AreEqual(3, inputs.Length);
            Assert.AreEqual(char.MinValue, ((TerminalRangeInput)inputs[0]).FirstValue);
            Assert.AreEqual('a', ((TerminalRangeInput)inputs[0]).LastValue);
            Assert.AreEqual('c', ((TerminalRangeInput)inputs[1]).FirstValue);
            Assert.AreEqual('c', ((TerminalRangeInput)inputs[1]).LastValue);
            Assert.AreEqual('e', ((TerminalRangeInput)inputs[2]).FirstValue);
            Assert.AreEqual(char.MaxValue, ((TerminalRangeInput)inputs[2]).LastValue);
        }