Пример #1
0
        public void GivenAValidComputedValueWhenValidatedThenTrueMustBeReturned(
            string computedValue, string value, string checkDigit)
        {
            var provider = new Mod11Radix2();

            Assert.True(provider.IsValid(computedValue));
        }
Пример #2
0
        public void GivenAnBadFormatComputedValueWhenValidatedThenExceptionMustBeThrown(string computedValue)
        {
            var provider = new Mod11Radix2();

            Assert.ThrowsAny <ArgumentException>(() =>
            {
                provider.IsValid(computedValue);
            });
        }
Пример #3
0
        public void GivenAnInvalidComputedValueWhenValidatedThenFalseMustBeReturned(string computedValue)
        {
            var provider = new Mod11Radix2();

            Assert.False(provider.IsValid(computedValue));
        }