Compare commits
1 Commits
b5a6b1c653
...
e918b26d6c
| Author | SHA1 | Date | |
|---|---|---|---|
| e918b26d6c |
@@ -1,6 +1,5 @@
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
using AutoMapper.Internal;
|
||||
using LittleTown.Core.Exceptions;
|
||||
using LittleTown.StaticDataAcces;
|
||||
|
||||
@@ -18,4 +17,21 @@ public class ExceptionTesting
|
||||
Assert.Throws<JsonException>(() => getter.GetObjectives());
|
||||
Assert.Throws<JsonException>(() => getter.GetBuildings());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void NombreDeJoueurMauvaisDansMatch()
|
||||
{
|
||||
StaticDataGetter getter = new();
|
||||
|
||||
Match match2Player = new Match(getter);
|
||||
match2Player.AddPlayer("Player1");
|
||||
match2Player.AddPlayer("Player2");
|
||||
|
||||
Type type = match2Player.GetType();
|
||||
|
||||
PropertyInfo? prop = type?.BaseType?.GetProperty("_players");
|
||||
|
||||
prop?.SetValue(match2Player, new Dictionary<string, PlayerZone>(), null);
|
||||
Assert.Throws<MatchConfigException>(() => match2Player.Init());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user