Package org.cedj.geekseek.domain.conference.model

Examples of org.cedj.geekseek.domain.conference.model.Session


        new Session("", "", null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void shouldNotAllowNullSetterTitle() throws Exception {
        Session sess = new Session("", "", new Duration(new Date(), new Date()));
        sess.setTitle(null);
    }
View Full Code Here


        sess.setTitle(null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void shouldNotAllowNullSetterOutline() throws Exception {
        Session sess = new Session("", "", new Duration(new Date(), new Date()));
        sess.setOutline(null);
    }
View Full Code Here

        sess.setOutline(null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void shouldNotAllowNullSetterDuration() throws Exception {
        Session sess = new Session("", "", new Duration(new Date(), new Date()));
        sess.setDuration(null);
    }
View Full Code Here

            new Duration(toDate(2013, 11, 11), toDate(2013, 11, 15)));
        return conference;
    }

    public static Session createSession() {
        Session session = new Session(
            "Testing the Enterprise layers - The A, B, C’s of integration testing",
            "For years we’ve been exploring how to layer and separate our code to test in isolation on the unit level. We’ve kept integration and functional testing as a big ball of mud; jumping straight from unit to full system testing. But can we apply some of the same lessons learned from unit to integration testing?\\n\\nThis session explore the different technologies within the Java Enterprise specification and see how our application can be tested in isolation; layer for layer, module for module and component for component.\\n\\nCan we isolate and stay real at the same time? Does mocks, stubs and test doubles have a place in the world of integration testing? Are there other lessons to be learned?",
            new Duration(toDate(2013, 11, 11, 15, 00), toDate(2013, 11, 11, 16, 00)));
        return session;
    }
View Full Code Here

        Conference conference = getRepository().get(conferenceId);
        if (conference == null) {
            return Response.status(Status.BAD_REQUEST).build(); // TODO: Need Business Exception type to explain why?
        }

        Session session = sessionConverter.to(getUriInfo(), sessionRepresentation);
        conference.addSession(session);
        getRepository().store(conference);

        return Response.created(
            UriBuilder.fromResource(
                SessionResource.class).segment("{id}")
                .build(session.getId()))
            .build();
    }
View Full Code Here

        return rep;
    }

    @Override
    public Session to(UriInfo uriInfo, SessionRepresentation representation) {
        Session session = new Session(
            representation.getTitle(),
            representation.getOutline(),
            new Duration(representation.getStart(), representation.getEnd()));
        return session;
    }
View Full Code Here

TOP

Related Classes of org.cedj.geekseek.domain.conference.model.Session

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.