ajout des la base des batiments
All checks were successful
dotnet package / build (8.0.x) (push) Successful in 2m54s
All checks were successful
dotnet package / build (8.0.x) (push) Successful in 2m54s
This commit was merged in pull request #6.
This commit is contained in:
@@ -5,7 +5,7 @@ namespace LittleTown.Core.Tests;
|
||||
|
||||
public class BuildingTesting
|
||||
{
|
||||
List<Building> _buildings;
|
||||
ICollection<Building> _buildings;
|
||||
|
||||
public BuildingTesting()
|
||||
{
|
||||
@@ -17,10 +17,14 @@ public class BuildingTesting
|
||||
public void TestCosts()
|
||||
{
|
||||
Building? b = _buildings.FirstOrDefault(b => b.Name.Equals("Atelier"));
|
||||
Assert.NotNull(b);
|
||||
Assert.Equal(2, b.Price[Enums.ResourceType.Rock]);
|
||||
|
||||
b = _buildings.FirstOrDefault(b => b.Name == "Bar");
|
||||
Assert.NotNull(b);
|
||||
Assert.Equal(2, b.Price[Enums.ResourceType.Cereal]);
|
||||
Assert.Equal(2, b.Price[Enums.ResourceType.Rock]);
|
||||
|
||||
Assert.Equal(12, _buildings.Count(b => b.BeginnerBuilding));
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
using LittleTown.StaticDataAcces;
|
||||
|
||||
namespace LittleTown.Core.Tests;
|
||||
|
||||
public class MatchTesting
|
||||
@@ -5,15 +7,16 @@ public class MatchTesting
|
||||
[Fact]
|
||||
public void EnforcePlayerCountInMatchCreation()
|
||||
{
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => { new Match(1); });
|
||||
StaticDataGetter getter = new();
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => { new Match(1, getter); });
|
||||
|
||||
Match match2Player = new Match(2);
|
||||
Match match2Player = new Match(2, getter);
|
||||
|
||||
Match match3Player = new Match(3);
|
||||
Match match3Player = new Match(3, getter);
|
||||
|
||||
Match match4Player = new Match(4);
|
||||
Match match4Player = new Match(4, getter);
|
||||
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => { new Match(5); });
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => { new Match(5, getter); });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user