test: add test with changing address order

This commit is contained in:
James Houlahan
2020-05-06 09:57:34 +02:00
parent c61e8bdc71
commit 2d200f6f8c
19 changed files with 202 additions and 23 deletions

View File

@ -146,6 +146,10 @@ func (a *TestAccount) AddressID() string {
return a.addressToBeUsed.ID
}
func (a *TestAccount) GetAddressID(addressTestID string) string {
return a.addressesByBDDAddressID[addressTestID].ID
}
// EnsureAddressID accepts address (simply the address) or bddAddressID used
// in tests (in format [bddAddressID]) and returns always the real address ID.
// If the address is not found, the ID of main address is returned.
@ -163,6 +167,10 @@ func (a *TestAccount) EnsureAddressID(addressOrAddressTestID string) string {
return a.AddressID()
}
func (a *TestAccount) GetAddress(addressTestID string) string {
return a.addressesByBDDAddressID[addressTestID].Email
}
// EnsureAddress accepts address (simply the address) or bddAddressID used
// in tests (in format [bddAddressID]) and returns always the address.
// If the address ID cannot be found, the original value is returned.