Class AccountManager

java.lang.Object
de.calamanari.pk.servicestub.AccountManager

public class AccountManager
extends java.lang.Object
Account Manager - a component to be tested
An instance can only be tested with a valid AddressValidator reference injected.
Author:
Karl Eilebrecht
  • Constructor Summary

    Constructors
    Constructor Description
    AccountManager​(AddressValidatorService addressValidatorService)
    Constructor (to be used by framework) allowing service reference injection
  • Method Summary

    Modifier and Type Method Description
    Account createAccount​(java.lang.String firstName, java.lang.String lastName, java.lang.String street, java.lang.String zipCode, java.lang.String city)
    Creates new valid account - the method we will test, it uses address validation service internally

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AccountManager

      public AccountManager​(AddressValidatorService addressValidatorService)
      Constructor (to be used by framework) allowing service reference injection
      Parameters:
      addressValidatorService - injected validation service
  • Method Details

    • createAccount

      public Account createAccount​(java.lang.String firstName, java.lang.String lastName, java.lang.String street, java.lang.String zipCode, java.lang.String city) throws AccountValidationException
      Creates new valid account - the method we will test, it uses address validation service internally
      Parameters:
      firstName - person's first name
      lastName - person's last name
      street - address field
      zipCode - address field
      city - address field
      Returns:
      new account
      Throws:
      AccountValidationException - if account could not be created