private static void TestBuildTimberCamp(int villageId)
        {
            buildingService.Build(1);
            int wood;
            int stone;

            using (var db = new AppDbContext())
            {
                wood  = db.Resources.Find(1).Amount;
                stone = db.Resources.Find(2).Amount;
            }
            // wood = 80, stone = 84
            Console.WriteLine(wood == 80 && stone == 84 ? "BuildingService - Test02 - OK" : "BuildingService - Test02 - FAIL");
        }
示例#2
0
 /// <summary>
 /// Builds a building in the village
 /// </summary>
 /// <param name="buildingId">building id</param>
 public void BuildBuilding(int buildingId)
 {
     buildingService.Build(buildingId);
 }