_theEventManager = EventManager.getInstance();
}
@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);
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);
}