You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.1 KiB
48 lines
1.1 KiB
using Models;
|
|
using Models.Game;
|
|
|
|
namespace Tests;
|
|
|
|
public class MapTests
|
|
{
|
|
[Fact]
|
|
public void Map_Initialization_SetsBackground()
|
|
{
|
|
string name = "test_name";
|
|
string background = "test_background";
|
|
|
|
var map = new Map(name,background);
|
|
|
|
Assert.Equal(background, map.Background);
|
|
}
|
|
|
|
[Fact]
|
|
public void Map_Initialization_InitializesBoards()
|
|
{
|
|
string name = "test_name";
|
|
string background = "test_background";
|
|
|
|
var map = new Map(name, background);
|
|
|
|
Assert.Equal(49, map.Boards.Count);
|
|
for (int i = 0; i < 36; i++)
|
|
{
|
|
Assert.Equal(new Cell(i / 7, i % 7), map.Boards[i]);
|
|
}
|
|
}
|
|
|
|
[Fact]
|
|
public void Map_Initialization_InitializesRopePathsAndZones()
|
|
{
|
|
string name = "test_name";
|
|
string background = "test_background";
|
|
|
|
var map = new Map(name, background);
|
|
|
|
Assert.NotNull(map.RopePaths);
|
|
Assert.NotNull(map.Zones);
|
|
Assert.Empty(map.RopePaths);
|
|
Assert.Empty(map.Zones);
|
|
}
|
|
}
|