This commit is contained in:
@@ -17,7 +17,7 @@ public class BoardTesting
|
||||
[Fact]
|
||||
public void BoardGetTile()
|
||||
{
|
||||
Assert.Equal(ResourceType.Fish, _board.GetTile(0, 3)?.ResourceType);
|
||||
Assert.Equal(ResourceType.Fish, _board.GetTile(0, 3).ResourceType);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -7,31 +7,31 @@ namespace LittleTown.Core.Tests;
|
||||
public class MatchTesting
|
||||
{
|
||||
[Fact]
|
||||
public void EnforcePlayerCountInMatchCreation()
|
||||
public async Task EnforcePlayerCountInMatchCreation()
|
||||
{
|
||||
StaticDataGetter getter = new();
|
||||
var match = new Match(getter);
|
||||
match.AddPlayer("Player1");
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => { match.Init(); });
|
||||
await Assert.ThrowsAsync<ArgumentOutOfRangeException>(() => match.Init() );
|
||||
|
||||
Match match2 = new Match(getter);
|
||||
match2.AddPlayer("Player1");
|
||||
match2.AddPlayer("Player2");
|
||||
Assert.Throws<MatchConfigException>(() => match2.AddPlayer("Player2"));
|
||||
match2.Init();
|
||||
await match2.Init();
|
||||
|
||||
Match match3 = new Match(getter);
|
||||
match3.AddPlayer("Player1");
|
||||
match3.AddPlayer("Player2");
|
||||
match3.AddPlayer("Player3");
|
||||
match3.Init();
|
||||
await match3.Init();
|
||||
|
||||
Match match4 = new Match(getter);
|
||||
match4.AddPlayer("Player1");
|
||||
match4.AddPlayer("Player2");
|
||||
match4.AddPlayer("Player3");
|
||||
match4.AddPlayer("Player4");
|
||||
match4.Init();
|
||||
await match4.Init();
|
||||
|
||||
Match match5 = new Match(getter);
|
||||
match5.AddPlayer("Player1");
|
||||
@@ -42,13 +42,13 @@ public class MatchTesting
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TwoPlayerInitMatchTest()
|
||||
public async Task TwoPlayerInitMatchTest()
|
||||
{
|
||||
StaticDataGetter getter = new();
|
||||
Match match = new Match(getter);
|
||||
match.AddPlayer("Player1");
|
||||
match.AddPlayer("Player2");
|
||||
match.Init();
|
||||
await match.Init();
|
||||
|
||||
PlayerZone player1 = match.GetPlayerZone("Player1");
|
||||
PlayerZone player1_3 = match.GetPlayerZone("Player2");
|
||||
|
||||
Reference in New Issue
Block a user