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

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


    @Test
    @UsingDataSet({"conference.yml", "session.yml"})
    @ShouldMatchDataSet({"conference.yml", "session_empty.yml"})
    public void shouldBeAbleToRemoveSession() {

        Session session = repository.get("SA");

        repository.remove(session);
        Assert.assertTrue(removedEventFired);
    }
View Full Code Here


    @Test
    @UsingDataSet({ "conference.yml", "session.yml" })
    @ShouldMatchDataSet(value = { "conference.yml", "session_updated.yml" })
    public void shouldBeAbleToChangeSession() {

        Session session = repository.get("SA");
        session.setTitle("UPDATED");

        repository.store(session);
        Assert.assertTrue(createdEventFired);
    }
View Full Code Here

    }

    @Test(expected = UnsupportedOperationException.class)
    public void shouldNotAllowToAddSessionToSessions() throws Exception {
        Conference conf = new Conference("", "", new Duration(new Date(), new Date()));
        Session sess = new Session("", "", new Duration(new Date(), new Date()));
        conf.getSessions().add(sess);
    }
View Full Code Here

        return "session";
    }

    @Override
    protected Session createDomainObject() {
        return new Session("Title", "Outline", new Duration(new Date(), new Date()));
    }
View Full Code Here

    @UsingDataSet({ "conference.yml", "session.yml" })
    @ShouldMatchDataSet({ "conference.yml", "session_empty.yml" })
    public void shouldBeAbleToRemoveConferenceWithSession() {

        Conference conference = repository.get("CA");
        Session session = conference.getSessions().toArray(new Session[0])[0];
        conference.removeSession(session);

        repository.store(conference);
    }
View Full Code Here

        return Session.class;
    }

    @Override
    public Session get(String id) {
        Session session = conferenceRepository.getSessionById(id);
        if(session == null) {
            for(Session s: sessions) {
                if(s.getId().equals(id)) {
                    return s;
                }
View Full Code Here

public class SessionValidationTestCase extends TimestampableSpecification<Session> {

    @Override
    protected Session createInstance() throws Exception {
        return new Session("", "", new Duration(new Date(), new Date()));
    }
View Full Code Here

        m.invoke(entity);
    }

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

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

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

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

    @Test(expected = IllegalArgumentException.class)
    public void shouldNotAllowNullConstructorDuration() throws Exception {
        new Session("", "", null);
    }
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.