Пример #1
0
        public void ToString_Should_Honour_Rows_Override()
        {
            var generation = new Generation(new Coordinate(0, 0));

            Assert.Equal(Generation.LiveCellChar + Environment.NewLine + Generation.DeadCellChar, generation.ToString(2, 0));
        }
Пример #2
0
        public void ToString_Should_Honour_Cols_Override()
        {
            var generation = new Generation(new Coordinate(0, 0));

            Assert.Equal(Generation.LiveCellChar.ToString() + Generation.DeadCellChar, generation.ToString(0, 2));
        }
Пример #3
0
        public void ToString_Should_Return_Proper_String_With_Two_Vert_Coords()
        {
            var generation = new Generation(new Coordinate(0, 0), new Coordinate(0, 1));

            Assert.Equal(Generation.LiveCellChar + Environment.NewLine + Generation.LiveCellChar, generation.ToString());
        }
Пример #4
0
        public void ToString_Should_Return_Proper_String_With_Two_Horz_Coords()
        {
            var generation = new Generation(new Coordinate(0, 0), new Coordinate(1, 0));

            Assert.Equal(Generation.LiveCellChar.ToString() + Generation.LiveCellChar, generation.ToString());
        }
Пример #5
0
        public void ToString_Should_Return_Proper_String_With_Negative_Coords()
        {
            var generation = new Generation(new Coordinate(-1, -1));

            Assert.Equal(Generation.LiveCellChar.ToString(), generation.ToString());
        }
Пример #6
0
        public void ToString_Should_Return_Empty_String_If_Grid_Is_Empty()
        {
            var generation = new Generation();

            Assert.Equal(string.Empty, generation.ToString());
        }