Package com.wakaleo.gameoflife.domain

Examples of com.wakaleo.gameoflife.domain.GridReader


    public void shouldBeAbleToReadAnEmptyGridOfCellsFromAnEmptyString() {
        String gridContents = "";

        Cell[][] expectedCells = {{}};

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }
View Full Code Here


    public void shouldBeAbleToReadAGridContainingASingleCellFromAString() {
        String gridContents = "*";

        Cell[][] expectedCells = {{LIVE_CELL}};

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }
View Full Code Here

                {DEAD_CELL, DEAD_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, DEAD_CELL}
        };

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }
View Full Code Here

                {DEAD_CELL, DEAD_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, DEAD_CELL}
        };

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }
View Full Code Here

                {LIVE_CELL, DEAD_CELL, DEAD_CELL},
                {DEAD_CELL, LIVE_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, LIVE_CELL}
        };

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }
View Full Code Here

                {DEAD_CELL, DEAD_CELL, DEAD_CELL, DEAD_CELL},
                {LIVE_CELL, LIVE_CELL, DEAD_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, LIVE_CELL, DEAD_CELL}
        };

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }
View Full Code Here

                {DEAD_CELL, DEAD_CELL, LIVE_CELL, DEAD_CELL, DEAD_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, LIVE_CELL, DEAD_CELL, DEAD_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, LIVE_CELL, DEAD_CELL, DEAD_CELL, DEAD_CELL},
        };

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }
View Full Code Here

                {DEAD_CELL, DEAD_CELL, LIVE_CELL, DEAD_CELL, DEAD_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, LIVE_CELL, DEAD_CELL, DEAD_CELL, DEAD_CELL},
                {DEAD_CELL, DEAD_CELL, LIVE_CELL, DEAD_CELL, DEAD_CELL, DEAD_CELL},
        };

        GridReader gridReader = new GridReader();
        Cell[][] loadedCells = gridReader.loadFrom(gridContents);

        assertThat(loadedCells, is(expectedCells));
    }
View Full Code Here

TOP

Related Classes of com.wakaleo.gameoflife.domain.GridReader

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.