Package de.fhdw.ify208.ticketmaster.webapp.model

Examples of de.fhdw.ify208.ticketmaster.webapp.model.UserProfile


  }

  @Test
  public void maintainCustomerAddress() {
    CustomerDTO customer = _theCustomerManager.signOn("appelgriebsch", "1234");
    AddressDTO address = new AddressDTO();
    TypeCodeDTO tpCode = new TypeCodeDTO();
    tpCode.setName("Private");
    tpCode.setId(1);
    CountryDTO countryDTO = new CountryDTO();
    countryDTO.setIsoCode("TUR");
    address.setAddressType(tpCode);
    address.setAddressLine("Mustetstrasse 7");
    address.setCityName("Musterstadt");
    address.setCountry(countryDTO);
    address.setDistrict("NRW");
    address.setZipCode("33397");
    address.setStreetName("Mustetstrasse 7");
    address.setMessage("TEST");
    AddressDTO result = _theCustomerManager.maintainAddress(customer,address);
    Assert.assertTrue("Maintain address:",result.getReturncode() == 0);
  }
View Full Code Here


  }

  @Test
  public void createEvent() {
    EventDTO event = new EventDTO();
    AddressDTO location = new AddressDTO();
    TypeCodeDTO tpCode = new TypeCodeDTO();
    TypeCodeDTO tpCode1 = new TypeCodeDTO();
    CountryDTO country = new CountryDTO();
    BaseDTO result = new BaseDTO();
    Date d1 = new Date(2011, 12, 31, 20, 0,0);
    Date d2 = new Date(2011, 12, 31, 21, 0,0);
    country.setIsoCode("TUR");
    tpCode.setId(1);
    tpCode.setDescription("Test");
    tpCode1.setId(1);
    location.setid(new Long(3));
    location.setAddressType(tpCode1);
    location.setCountry(country);
    location.setAddressLine("TEST MARK");
    location.setStreetName("TEST MARK");
    location.setZipCode("33333");
    location.setCityName("TEST MARK");
    location.setDistrict("NRW");
    event.setid(new Long(3));
    event.setAdUrl("Test");
    event.setDescription("TEST MARK");
    event.setLocation(location);
    event.setMaxNoOfTickets(20);
View Full Code Here

  }

  @Test
  public void getCustomerAddresses() {
    CustomerDTO customer = _theCustomerManager.signOn("appelgriebsch", "1234");
    AddressListDTO result = _theCustomerManager.getCustomerAddresses(customer);
    Assert.assertTrue("Got Customer Adresses:",result.getReturncode() == 0);
   
    customer = _theCustomerManager.signOn("test", "1234");
    result = _theCustomerManager.getCustomerAddresses(customer);
    Assert.assertTrue("Could not get Customer Adresses:",result.getReturncode() != 0);
  }
View Full Code Here

  }

  @Test
  public void createArtist() {
    BaseDTO result = new BaseDTO();
    ArtistDTO artist = new ArtistDTO();
    TypeCodeDTO tpCode = new TypeCodeDTO();
    tpCode.setId(1);
    tpCode.setDescription("Test");
    artist.setid(new Long(4));
    artist.setStageName("Test4");
    artist.setFirstName("First");
    artist.setLastName("Last");
    artist.setMessage("Test");
    artist.setGenre(tpCode);
    artist.setMessage("Test");
    result = _theEventManager.registerNewArtist(artist);
    Assert.assertTrue("New Artist:",result.getReturncode() == 0);
   
    artist.setid(new Long(2));
    artist.setStageName("Test");
    artist.setFirstName("First");
    artist.setLastName("Last");
    artist.setMessage("Test");
    artist.setGenre(tpCode);
    artist.setMessage("Test");
    result = _theEventManager.registerNewArtist(artist);
    Assert.assertTrue("New Artist not registered:",result.getReturncode() != 0)
  }
View Full Code Here

  }

  @Test
  public void cancelOrder() {
    //public BaseDTO cancelOrder(OrderDTO orderDTO){
    BaseDTO result = new BaseDTO();
    OrderDTO order = new OrderDTO();
    order.setid(new Long(12));
    result = _theOrderManager.cancelOrder(order);
    Assert.assertTrue("Cancel Order:", result.getReturncode() == 0);

    order.setid(new Long(8));
    result = _theOrderManager.cancelOrder(order);
    Assert.assertTrue("Cancel Order not possible:", result.getReturncode() != 0);
  }
View Full Code Here

    newCustomer.setPassword("12345");       // TODO: encrypt password !!!
    newCustomer.setSalutation("Hr.");
    newCustomer.setType(tpCode);
    newCustomer.setUserName("appelgriebsch");

    BaseDTO result = _theCustomerManager.registerCustomer(newCustomer);

    Assert.assertTrue("Customer created", result.getReturncode() == 0);
  }
View Full Code Here

  }

  @Test
    public void changeCustomerPassword() {

    BaseDTO result = _theCustomerManager.changePassword("appelgriebsch", "12345", "1234");
    Assert.assertTrue("Password change successfull", result.getReturncode() == 0);
   
    result = _theCustomerManager.changePassword("test", "12345", "1234");
    Assert.assertTrue("Password change not successfull", result.getReturncode() != 0);
  }
View Full Code Here

    address.setCountry(countryDTO);
    address.setDistrict("NRW");
    address.setZipCode("33397");
    address.setStreetName("Mustetstrasse 7");
    address.setMessage("TEST");
    BaseDTO result = _theCustomerManager.removeAddress(customer, address);
    Assert.assertTrue("Maintain address:",result.getReturncode() == 0);
  }
View Full Code Here

    EventDTO event = new EventDTO();
    AddressDTO location = new AddressDTO();
    TypeCodeDTO tpCode = new TypeCodeDTO();
    TypeCodeDTO tpCode1 = new TypeCodeDTO();
    CountryDTO country = new CountryDTO();
    BaseDTO result = new BaseDTO();
    Date d1 = new Date(2011, 12, 31, 20, 0,0);
    Date d2 = new Date(2011, 12, 31, 21, 0,0);
    country.setIsoCode("TUR");
    tpCode.setId(1);
    tpCode.setDescription("Test");
    tpCode1.setId(1);
    location.setid(new Long(3));
    location.setAddressType(tpCode1);
    location.setCountry(country);
    location.setAddressLine("TEST MARK");
    location.setStreetName("TEST MARK");
    location.setZipCode("33333");
    location.setCityName("TEST MARK");
    location.setDistrict("NRW");
    event.setid(new Long(3));
    event.setAdUrl("Test");
    event.setDescription("TEST MARK");
    event.setLocation(location);
    event.setMaxNoOfTickets(20);
    event.setTicketPrice(new BigDecimal(2.00));
    event.setCategory(tpCode);
    event.setEndDate(d2);
    event.setStartDate(d1);
    result = _theEventManager.registerNewEvent(event);
    Assert.assertTrue("New Event:",result.getReturncode() == 0);
  }
View Full Code Here

    Assert.assertTrue("New Event:",result.getReturncode() == 0);
  }

  @Test
  public void createArtist() {
    BaseDTO result = new BaseDTO();
    ArtistDTO artist = new ArtistDTO();
    TypeCodeDTO tpCode = new TypeCodeDTO();
    tpCode.setId(1);
    tpCode.setDescription("Test");
    artist.setid(new Long(4));
    artist.setStageName("Test4");
    artist.setFirstName("First");
    artist.setLastName("Last");
    artist.setMessage("Test");
    artist.setGenre(tpCode);
    artist.setMessage("Test");
    result = _theEventManager.registerNewArtist(artist);
    Assert.assertTrue("New Artist:",result.getReturncode() == 0);
   
    artist.setid(new Long(2));
    artist.setStageName("Test");
    artist.setFirstName("First");
    artist.setLastName("Last");
    artist.setMessage("Test");
    artist.setGenre(tpCode);
    artist.setMessage("Test");
    result = _theEventManager.registerNewArtist(artist);
    Assert.assertTrue("New Artist not registered:",result.getReturncode() != 0)
  }
View Full Code Here

TOP

Related Classes of de.fhdw.ify208.ticketmaster.webapp.model.UserProfile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.