@Test public void shouldCreateContract() throws ServiceException, ValidationException { System.err.println("==================== TEST =================="); Contract contract = testingInstance.createContract(renter, estate, dealer, price); price.setContract(contract); priceManger.update(price); System.err.println("==================== TEST DELETE CONTRACT =================="); contractManager.delete(contract); System.err.println("==================== TEST DELETE DEALER =================="); System.out.println(dealerManger.delete(dealer)); }
@Before public void setUp() throws ValidationException { renter = renterManger.createRenter( "John", "Doe", Calendar.getInstance().getTime(), "ZX067345", "1231230909"); estate = estateManger.createEstate(new HashSet<RentArea>(), "Title", "Description"); price = priceManger.createPrice(AMOUNT, USD); dealer = dealerManger.createDealer(NAME, SURNAME, PHONE_NUMBER); // price = new Price(); // dealer = new Dealer(); // price.setAmount(AMOUNT); // price.setCurrency(USD); // dealer.setName("John"); // dealer.setSurname(SURNAME); // dealer.setPhoneNumber(PHONE_NUMBER); }