예제 #1
0
        public void WillNotProhibitValuesNotInTable()
        {
            var input  = "ThisIsAStringWithoutSpaces";
            var step   = new ProhibitedValueStep(ValueRangeTable.Build(Tables.C_1_1).Compile());
            var output = step.Run(input);

            Assert.Equal(input, output);
        }
예제 #2
0
        public void WillNotProhibitValuesNotInTable()
        {
            const string input  = "ThisIsAStringWithoutSpaces";
            var          step   = new ProhibitedValueStep(ValueRangeTable.Build(Prohibited.C11).Compile());
            var          output = step.Run(input);

            output.ShouldBe(input);
        }
예제 #3
0
        public void WillProhibitValuesInTable()
        {
            var    input = $"{Convert.ToChar(0x20)}";
            var    step  = new ProhibitedValueStep(ValueRangeTable.Build(Prohibited.C11).Compile());
            Action run   = () => { step.Run(input); };

            run.ShouldThrow <ProhibitedValueException>();
        }
예제 #4
0
        public void WillProhibitValuesInTable()
        {
            var input = new StringBuilder();

            input.Append(Convert.ToChar(0x20));
            var step = new ProhibitedValueStep(ValueRangeTable.Build(Tables.C_1_1).Compile());

            Assert.Throws <ProhibitedValueException>(() => step.Run(input.ToString()));
        }