public async Task ItShouldSaveData() { await this.DatabaseTestAsync(async testDatabase => { this.target = new DeleteUserPaymentInformationDbStatement(testDatabase); await this.CreateDataAsync(UserId, testDatabase, false); await testDatabase.TakeSnapshotAsync(); await this.target.ExecuteAsync(UserId); return(new ExpectedSideEffects { Insert = new UserPaymentOrigin( UserId.Value, null, null, PaymentOriginKeyType.None, null, null, null, null, default(PaymentStatus)) }); }); }
public async Task WhenDataExists_ItShouldSaveData() { await this.DatabaseTestAsync(async testDatabase => { this.target = new DeleteUserPaymentInformationDbStatement(testDatabase); await this.CreateDataAsync(UserId, testDatabase, true); await testDatabase.TakeSnapshotAsync(); await this.target.ExecuteAsync(UserId); return(new ExpectedSideEffects { Update = new UserPaymentOrigin( UserId.Value, null, null, PaymentOriginKeyType.None, CountryCode.Value, CreditCardPrefix.Value, IpAddress.Value, TaxamoOriginalTransactionKey, PaymentStatus) }); }); }
public void Initialize() { this.target = new DeleteUserPaymentInformationDbStatement(new Mock <FifthweekDbConnectionFactory>(MockBehavior.Strict).Object); }