Examples of volumeToRead()


Examples of inheritance.vs.composition.BookInfo.volumeToRead()

    @Test
    public void testBookWithMoreThan1000PagesIsHuge() throws Exception {
        //GIVEN
        BookInfo bookInfo = new BookInfo(1001, "Some Book Title");
        //WHEN & THEN
        assertThat(bookInfo.volumeToRead(), is(VolumeSize.huge));
    }

    @Test
    public void testBookWithMoreThan300PagesButLessThan1000PagesIsBig() throws Exception {
        //GIVEN
View Full Code Here

Examples of inheritance.vs.composition.BookInfo.volumeToRead()

        //GIVEN
        BookInfo bookInfo = new BookInfo(1000, "Some Book Title");
        BookInfo anotherBookInfo = new BookInfo(301, "Some Book Title");
        //WHEN & THEN
        assertThat(bookInfo.volumeToRead(), is(VolumeSize.big));
        assertThat(anotherBookInfo.volumeToRead(), is(VolumeSize.big));
    }

    @Test
    public void testBookWithMoreThan100PagesButLessThan300PagesIsMedium() throws Exception {
        //GIVEN
View Full Code Here

Examples of inheritance.vs.composition.BookInfo.volumeToRead()

        //GIVEN
        BookInfo bookInfo = new BookInfo(101, "Some Book Title");
        BookInfo anotherBookInfo = new BookInfo(300, "Some Book Title");
        //WHEN & THEN
        assertThat(bookInfo.volumeToRead(), is(VolumeSize.medium));
        assertThat(anotherBookInfo.volumeToRead(), is(VolumeSize.medium));
    }

    @Test
    public void testBookWithLessThan100PagesIsSmall() throws Exception {
        //GIVEN
View Full Code Here

Examples of inheritance.vs.composition.BookInfo.volumeToRead()

        //GIVEN
        BookInfo bookInfo = new BookInfo(0, "Some Book Title");
        BookInfo anotherBookInfo = new BookInfo(100, "Some Book Title");
        //WHEN & THEN
        assertThat(bookInfo.volumeToRead(), is(VolumeSize.small));
        assertThat(anotherBookInfo.volumeToRead(), is(VolumeSize.small));
    }

    @Test
    public void testTwoBooksWithSameTitleAreEqual() throws Exception {
        //GIVEN
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.