Esempio n. 1
0
  private void testPostnumber() {
    String zipcode2 = "asfd";
    String street2 = "hindenburgplatz 64";
    String city2 = "malmo";
    String name2 = "leo bjornstrom";
    String personNr2 = "770202-2134";
    String email = "*****@*****.**";

    try {
      theBank.createCustomer(
          name2, personNr2, email, street2, zipcode2, city2, CustomerType.COMPANY);
    } catch (final PersonIDFormatException | ZipcodeFormatException e) {
      System.out.println("Error for zipcode not numbers, should be displayed");
      System.out.println("ERROR: " + e.getMessage());
    }
    zipcode2 = "123";
    street2 = "hindenburgplatz 64";
    city2 = "malmo";
    name2 = "leo bjornstrom";
    personNr2 = "770202-2134";
    email = "*****@*****.**";

    try {
      theBank.createCustomer(
          name2, personNr2, email, street2, zipcode2, city2, CustomerType.COMPANY);
    } catch (final PersonIDFormatException | ZipcodeFormatException e) {
      System.out.println("Error for zipcode not enough numbers, should be displayed");
      System.out.println("ERROR: " + e.getMessage());
    }
  }
Esempio n. 2
0
  private String createCompanyCustomerTest()
      throws PersonIDFormatException, ZipcodeFormatException {
    final String zipcode2 = "12312";
    final String street2 = "hindenburgplatz 64";
    final String city2 = "malmo";
    final String name2 = "leo bjornstrom";
    final String personNr2 = "810414-2134";
    final String email = "*****@*****.**";

    return theBank.createCustomer(
        name2, personNr2, email, street2, zipcode2, city2, CustomerType.COMPANY);
  }
Esempio n. 3
0
  private String createPrivateCustomerTest(String myID)
      throws PersonIDFormatException, ZipcodeFormatException {
    // inputs
    final String name1 = "seb jakobson";
    final String personNr1 = myID;
    final String street1 = "lundbergsgatan 11";
    final String zipcode1 = "21333";
    final String city1 = "malmo";
    final String email = "*****@*****.**";

    return theBank.createCustomer(
        name1, personNr1, email, street1, zipcode1, city1, CustomerType.PRIVATE_CUSTOMER);
  }