Documentation ¶
Index ¶
- Constants
- type TestAccount
- func (a *TestAccount) Address() string
- func (a *TestAccount) AddressID() string
- func (a *TestAccount) Addresses() *pmapi.AddressList
- func (a *TestAccount) BridgePassword() string
- func (a *TestAccount) EnsureAddress(addressOrAddressTestID string) string
- func (a *TestAccount) EnsureAddressID(addressOrAddressTestID string) string
- func (a *TestAccount) GetAddress(addressTestID string) string
- func (a *TestAccount) GetAddressID(addressTestID string) string
- func (a *TestAccount) IsTwoFAEnabled() bool
- func (a *TestAccount) MailboxPassword() string
- func (a *TestAccount) Password() string
- func (a *TestAccount) User() *pmapi.User
- func (a *TestAccount) UserID() string
- func (a *TestAccount) Username() string
- type TestAccounts
Constants ¶
View Source
const BridgePassword = "bridgepassword"
BridgePassword is password to be used for IMAP or SMTP under tests.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestAccount ¶
type TestAccount struct {
// contains filtered or unexported fields
}
func (*TestAccount) Address ¶
func (a *TestAccount) Address() string
func (*TestAccount) AddressID ¶
func (a *TestAccount) AddressID() string
func (*TestAccount) Addresses ¶
func (a *TestAccount) Addresses() *pmapi.AddressList
func (*TestAccount) BridgePassword ¶
func (a *TestAccount) BridgePassword() string
func (*TestAccount) EnsureAddress ¶
func (a *TestAccount) EnsureAddress(addressOrAddressTestID string) string
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.
func (*TestAccount) EnsureAddressID ¶
func (a *TestAccount) EnsureAddressID(addressOrAddressTestID string) string
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.
func (*TestAccount) GetAddress ¶
func (a *TestAccount) GetAddress(addressTestID string) string
func (*TestAccount) GetAddressID ¶
func (a *TestAccount) GetAddressID(addressTestID string) string
func (*TestAccount) IsTwoFAEnabled ¶
func (a *TestAccount) IsTwoFAEnabled() bool
func (*TestAccount) MailboxPassword ¶
func (a *TestAccount) MailboxPassword() string
func (*TestAccount) Password ¶
func (a *TestAccount) Password() string
func (*TestAccount) User ¶
func (a *TestAccount) User() *pmapi.User
func (*TestAccount) UserID ¶
func (a *TestAccount) UserID() string
func (*TestAccount) Username ¶
func (a *TestAccount) Username() string
type TestAccounts ¶
type TestAccounts struct { Users map[string]*pmapi.User // Key is user ID used in BDD. Addresses map[string]map[string]*pmapi.Address // Key is real user ID, second key is address ID used in BDD. Passwords map[string]string // Key is real user ID. MailboxPasswords map[string]string // Key is real user ID. TwoFAs map[string]bool // Key is real user ID. }
func Load ¶
func Load(path string) (*TestAccounts, error)
func (*TestAccounts) GetTestAccount ¶
func (a *TestAccounts) GetTestAccount(username string) *TestAccount
func (*TestAccounts) GetTestAccountWithAddress ¶
func (a *TestAccounts) GetTestAccountWithAddress(username, bddAddressID string) *TestAccount
GetTestAccountWithAddress returns the test account with the given username configured to use the given bddAddressID.
Click to show internal directories.
Click to hide internal directories.