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); }
public void WillNotProhibitValuesNotInTable() { const string input = "ThisIsAStringWithoutSpaces"; var step = new ProhibitedValueStep(ValueRangeTable.Build(Prohibited.C11).Compile()); var output = step.Run(input); output.ShouldBe(input); }
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>(); }
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())); }