Package com.agilebooster.data.entity

Examples of com.agilebooster.data.entity.Event


    @Test
    public void testCreate() {
        System.out.println("EventController:Create");
        EventController eventController = new EventController();
        Date eventDate = new Date();
        Event event = new Event("Title", 0, "Your Desk", eventDate, 1, "Unit tests point", project, scrumMaster);
        event.addGuest(guest1);
        event.addGuest(guest2);
        event.addGuest(guest3);
        Event eventResult = eventController.create(event);

        //Check Release properties.
        assertNotNull(eventResult.getId());
        assertEquals(event.getTitle(), eventResult.getTitle());
        assertEquals(event.getEventType(), eventResult.getEventType());
        assertEquals(event.getPlace(), eventResult.getPlace());
        assertEquals(event.getDuration(), eventResult.getDuration());
        assertEquals(event.getDescription(), eventResult.getDescription());
        assertEquals(event.getProject(), eventResult.getProject());
        assertEquals(event.getOrganizer(), eventResult.getOrganizer());
        assertEquals(3, eventResult.getGuests().size());
        assertTrue(eventResult.getGuests().contains(guest1));
        assertTrue(eventResult.getGuests().contains(guest2));
        assertTrue(eventResult.getGuests().contains(guest3));
        assertFalse(eventResult.getGuests().contains(scrumMaster));

        //Check project properties.
        project = projectController.refresh(project);
        assertTrue(project.getEvents().contains(eventResult));
View Full Code Here


    @Test
    public void testDestroy() {
        System.out.println("EventController:Destroy");
        EventController eventController = new EventController();
        Date eventDate = new Date();
        Event event = new Event("Title", 0, "Your Desk", eventDate, 1, "Unit tests point", project, scrumMaster);
        event.addGuest(guest1);
        event.addGuest(guest2);
        event.addGuest(guest3);
        event = eventController.create(event);
        assertTrue(eventController.destroy(event));
    }
View Full Code Here

TOP

Related Classes of com.agilebooster.data.entity.Event

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.