public async Task WhenDataExists_ItShouldSaveData()
        {
            await this.DatabaseTestAsync(async testDatabase =>
            {
                this.target = new ClearPaymentStatusDbStatement(testDatabase);
                await this.CreateDataAsync(UserId, testDatabase, true);
                await testDatabase.TakeSnapshotAsync();

                await this.target.ExecuteAsync(UserId);

                return(new ExpectedSideEffects
                {
                    Update = new UserPaymentOrigin(
                        UserId.Value,
                        null,
                        PaymentOriginKey,
                        PaymentOriginKeyType,
                        CountryCode,
                        CreditCardPrefix,
                        IpAddress,
                        TaxamoTransactionKey,
                        PaymentStatus.None)
                });
            });
        }
        public async Task WhenDataDoesNotExist_ItShouldSaveData()
        {
            await this.DatabaseTestAsync(async testDatabase =>
            {
                this.target = new ClearPaymentStatusDbStatement(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,
                        PaymentStatus.None)
                });
            });
        }
 public void Initialize()
 {
     this.target = new ClearPaymentStatusDbStatement(new Mock <FifthweekDbConnectionFactory>(MockBehavior.Strict).Object);
 }