public void MaskedString_WhenGeneratingWithSameString_ShouldMaskRandomly() { var maskedString1 = new MaskedString(_cardNumber); var maskedString2 = new MaskedString(_cardNumber); maskedString1.Value.ShouldNotBe(maskedString2.Value); }
public void MaskedString_OnComparison_ShouldCompareOriginalValue() { var maskedString1 = new MaskedString(_cardNumber); var maskedString2 = new MaskedString(_cardNumber); maskedString1.ShouldBe(maskedString2); }
public void MaskedString_WhenConvertedToString_ShouldHaveMaskedValue() { var sut = new MaskedString(_cardNumber); string converted = sut; sut.Value.ShouldNotBe(_cardNumber); }
public Payment(Guid id, int merchantId, string cardHolderName, string cardNumber, string expiryYearMonthString, string cvv, decimal amount, string currency) { Id = id; MerchantId = merchantId; CardHolderName = cardHolderName; CardNumber = new MaskedString(cardNumber); CardExpiryDate = CardExpiryDate.For(expiryYearMonthString); Cvv = cvv; Money = new Money(amount, currency); }
public void MaskedString_GivenNullObjectOnComparison_ShouldReturnFalse() { var sut = new MaskedString(_cardNumber); sut.Equals(null).ShouldBeFalse(); }
public void MaskedString_ValueShouldNotBeOriginalValue() { var sut = new MaskedString(_cardNumber); sut.Value.ShouldNotBe(_cardNumber); }