Exemplo n.º 1
0
        private void CheckTreasuryAfterUnitBuying(Dwelling dwelling, int requestedCount)
        {
            var unitCost = UnitsConstants.Current.UnitCost[dwelling.UnitType];

            sensorData.MyTreasury.Where(res => !unitCost.ContainsKey(res.Key) && res.Value == MaxResourceCount)
            .Should().HaveCount(4 - unitCost.Keys.Count);

            foreach (var resourceType in unitCost.Keys)
            {
                var remainingAmount = MaxResourceCount - requestedCount * unitCost[resourceType];
                sensorData.MyTreasury[resourceType].Should().Be(remainingAmount);
            }
        }
Exemplo n.º 2
0
 private void CheckUnitsCount(Dwelling dwelling, int requestedCount)
 {
     sensorData.MyArmy[dwelling.UnitType].Should().Be(requestedCount);
     sensorData.MyArmy.Values.Sum().Should().Be(requestedCount);
 }