示例#1
0
        public void GivenAValidComputedValueWhenValidatedThenTrueMustBeReturned(
            string computedValue, string value, string checkDigit)
        {
            var provider = new Mod37Radix2();

            Assert.True(provider.IsValid(computedValue));
        }
示例#2
0
        public void GivenAnBadFormatComputedValueWhenValidatedThenExceptionMustBeThrown(string computedValue)
        {
            var provider = new Mod37Radix2();

            Assert.ThrowsAny <ArgumentException>(() =>
            {
                provider.IsValid(computedValue);
            });
        }
示例#3
0
        public void GivenAnInvalidComputedValueWhenValidatedThenFalseMustBeReturned(string computedValue)
        {
            var provider = new Mod37Radix2();

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