private static void TestBuildHut(int villageId) { buildingService.BuildHut(villageId); int wood; int stone; using (var db = new AppDbContext()) { wood = db.Resources.Find(1).Amount; stone = db.Resources.Find(2).Amount; } //wood = 90, stone = 94 Console.WriteLine(wood == 90 && stone == 94 ? "BuildingService - Test01 - OK" : "BuildingService - Test01 - FAIL"); }
/// <summary> /// Builds huts in the village /// </summary> /// <param name="villageId">village id</param> /// <param name="amount">number of huts to be built</param> public void BuildHut(int villageId, int amount) { buildingService.BuildHut(villageId, amount); }