public void CanGenerateValidCreditorReferenceUsingInput(string reference, string expectedValue) { var creditorReference = CreditorReference.Create(reference); Assert.True(CreditorReference.IsValid(creditorReference.ElectronicFormat)); Assert.Equal(expectedValue, creditorReference.ElectronicFormat); }
public void FailsWhenReferencesAreInvalid() { Assert.Throws <ArgumentException>(() => CreditorReference.Create(null)); Assert.Throws <ArgumentException>(() => CreditorReference.Create("123456789", "123456789", "123456789")); }