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

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


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

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


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

    @Test(expected = IllegalArgumentException.class)
    public void shouldNotAllowNullConstructorEndBeforeStart() throws Exception {
        new Duration(new Date(), new Date(System.currentTimeMillis()-4000));
    }
View Full Code Here

    }

    @Test
    public void shouldNotLeakOnConststructStart() throws Exception {
        Date start = new Date();
        Duration dur = new Duration(start, new Date());
        start.setTime(100);

        Assert.assertNotEquals(start, dur.getStart());
    }
View Full Code Here

    }

    @Test
    public void shouldNotLeakOnConststructEnd() throws Exception {
        Date end = new Date();
        Duration dur = new Duration(new Date(), end);
        end.setTime(100);

        Assert.assertNotEquals(end, dur.getEnd());
    }
View Full Code Here

        Assert.assertNotEquals(end, dur.getEnd());
    }

    @Test
    public void shouldNotLeakOnGetStart() throws Exception {
        Duration dur = new Duration(new Date(), new Date());
        Date start = dur.getStart();
        start.setTime(100);

        Assert.assertNotEquals(start, dur.getStart());
    }
View Full Code Here

        Assert.assertNotEquals(start, dur.getStart());
    }

    @Test
    public void shouldNotLeakOnGetEnd() throws Exception {
        Duration dur = new Duration(new Date(), new Date());
        Date end = dur.getEnd();
        end.setTime(100);

        Assert.assertNotEquals(end, dur.getEnd());
    }
View Full Code Here

        return "conference";
    }

    @Override
    protected Conference createDomainObject() {
        return new Conference("Name", "TagLine", new Duration(new Date(), new Date()));
    }
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

TOP

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

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.