public void ThereWillRecordInTheStorageWithNoSensitiveData(long substitutionId) { LevyDeclarationModel declaration = null; WaitForIt(() => { var parameters = new DynamicParameters(); parameters.Add("@employerAccountId", substitutionId, DbType.Int64); var declarations = Connection.Query <LevyDeclarationModel>("select * from LevyDeclaration where EmployerAccountId = @employerAccountId" , param: parameters, commandType: CommandType.Text); declaration = declarations.FirstOrDefault(); return(declaration != null); }); declaration.Should().NotBeNull(); }
public void ThereWillBeThreeRecordsInTheStorage(long employerId) { LevyDeclarationModel declaration = null; WaitForIt(() => { var parameters = new DynamicParameters(); parameters.Add("@employerAccountId", employerId, DbType.Int64); var declarations = Connection.Query <LevyDeclarationModel>("select * from LevyDeclaration where EmployerAccountId = @employerAccountId" , param: parameters, commandType: CommandType.Text); declaration = declarations.FirstOrDefault(); return(declaration != null); }); declaration.Should().NotBeNull(); declaration.PayrollYear.Should().EndWith("17-18"); declaration.LevyAmountDeclared.Should().Be(8811M); declaration.TransactionDate.Should().BeCloseTo(DateTime.Now, precision: 60 * 1000); }