Package org.spw.controller

Examples of org.spw.controller.DonationController


        contact.getDonations().add(donation);
        contactCtrl.update(contact);
    }
   
    protected void tearDown() throws Exception {
        DonationController donationCtrl = new DonationController();
        Donation donation = donationCtrl.read(id);
        donationCtrl.delete(donation);
        ContactController contactCtrl = new ContactController();
        Contact contact = contactCtrl.read(id);
        contactCtrl.delete(contact);
    }
View Full Code Here


        String expResult = "success";
        String result = instance.buttonValidateBottom_action();
        assertEquals(expResult, result);
       
        //check the insertion of the entities
        DonationController donationCtrl = new DonationController();
        donation = donationCtrl.read(id);
        assertEquals(donation.getIdDonation(), id);
        assertEquals(donation.getDonor(), contact);
        assertEquals(donation.getDonor().getIdContact(), id);
        assertEquals(donation.getDonor().getFirstName(), this.getName());
        ContactController contactCtrl = new ContactController();
View Full Code Here

        assertTrue(contact.getDonations().contains(donation));
    }

    protected void tearDown() throws Exception {
        super.tearDown();
        DonationController donationCtrl = new DonationController();
        Donation donation = donationCtrl.read(id);
        donationCtrl.delete(donation);
        ContactController contactCtrl = new ContactController();
        Contact contact = contactCtrl.read(id);
        contactCtrl.delete(contact);
    }
View Full Code Here

            contact = new ContactController().read(getContact().getIdContact());
            aList.addAll(
                    contact.getDonations());
        } else {
            aList.addAll(
                    new DonationController().getDonations());
        }
    }
View Full Code Here

        String expResult = "success";
        String result = instance.buttonValidateBottom_action();
        assertEquals(expResult, result);
       
        //check the insertion of the entities
        DonationController donationCtrl = new DonationController();
        Donation resultDonation = donationCtrl.read(donation.getIdDonation());
        assertEquals(donation, resultDonation);
        assertEquals(contact, resultDonation.getDonor());
        assertEquals(this.getName(), resultDonation.getDonor().getFirstName());
        ContactController contactCtrl = new ContactController();
        Contact resultContact = contactCtrl.read(contact.getIdContact());
View Full Code Here

TOP

Related Classes of org.spw.controller.DonationController

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.