TEST(MapTest, isBadCellTypeReturnsWhenIndexIsOutOfRange) { IMap* map = new Map(IVector2D(10, 10)); EXPECT_EQ(CellType::BAD_TYPE, map->getCellType(IVector2D(10, 0))); EXPECT_EQ(CellType::BAD_TYPE, map->getCellType(IVector2D(0, 10))); EXPECT_EQ(CellType::BAD_TYPE, map->getCellType(IVector2D(10, 10))); }
TEST(MapTest, canSetCellType) { IMap* map = new Map(IVector2D(10, 10)); map->setCellType(IVector2D(0, 0), CellType::FOREST); ASSERT_EQ(CellType::FOREST, map->getCellType(IVector2D(0, 0))); }
TEST(MapTest, byDefaultTypeOfFirstCellIsPlains) { IMap* map = new Map(IVector2D(10, 10)); ASSERT_EQ(CellType::PLAINS, map->getCellType(IVector2D(0, 0))); }