Compare commits
1 Commits
e918b26d6c
...
b5a6b1c653
| Author | SHA1 | Date | |
|---|---|---|---|
| b5a6b1c653 |
@@ -1,5 +1,6 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
using AutoMapper.Internal;
|
||||||
using LittleTown.Core.Exceptions;
|
using LittleTown.Core.Exceptions;
|
||||||
using LittleTown.StaticDataAcces;
|
using LittleTown.StaticDataAcces;
|
||||||
|
|
||||||
@@ -17,21 +18,4 @@ public class ExceptionTesting
|
|||||||
Assert.Throws<JsonException>(() => getter.GetObjectives());
|
Assert.Throws<JsonException>(() => getter.GetObjectives());
|
||||||
Assert.Throws<JsonException>(() => getter.GetBuildings());
|
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