Example #1
0
        public void CanGenerateValidCreditorReferenceUsingInput(string reference, string expectedValue)
        {
            var creditorReference = CreditorReference.Create(reference);

            Assert.True(CreditorReference.IsValid(creditorReference.ElectronicFormat));
            Assert.Equal(expectedValue, creditorReference.ElectronicFormat);
        }
Example #2
0
 public void FailsWhenReferencesAreInvalid()
 {
     Assert.Throws <ArgumentException>(() => CreditorReference.Create(null));
     Assert.Throws <ArgumentException>(() => CreditorReference.Create("123456789", "123456789", "123456789"));
 }