public void ShouldRejectUnknownChargeBearer() { Assert.That(() => { SepaChargeBearerUtils.SepaChargeBearerFromString("unknown value"); }, Throws.TypeOf <ArgumentException>().With.Property("Message").Contains("Unknown Charge Bearer")); }
public void ShouldRetrieveChargeBearerFromString() { Assert.AreEqual(SepaChargeBearer.CRED, SepaChargeBearerUtils.SepaChargeBearerFromString("CRED")); Assert.AreEqual(SepaChargeBearer.DEBT, SepaChargeBearerUtils.SepaChargeBearerFromString("DEBT")); Assert.AreEqual(SepaChargeBearer.SHAR, SepaChargeBearerUtils.SepaChargeBearerFromString("SHAR")); }