public void Validate_Scenarios(string input, string expected) { var result = CardNumberUtil.Mask(input); Assert.IsNotNull(result); Assert.AreEqual(expected, result); }
public void Null_String_Throws_Exception() { var input = (string)null; Assert.ThrowsException <ArgumentNullException>(() => { CardNumberUtil.Mask(input); }); }
public GetChargeResponse(Charge charge) { if (charge is null) { throw new ArgumentNullException(nameof(charge)); } Id = charge.Id; IdempotentKey = charge.IdempotentKey; CreatedOn = charge.CreatedOn; Status = charge.Status; Amount = charge.Amount; Currency = charge.Currency; Description = charge.Description; CardNumber = CardNumberUtil.Mask(charge.CardNumber); }