Example #1
0
        public void CanAffordNewTrainer_RealInventory(int i_numTrainers, int i_expectedCostForNextTrainer)
        {
            Dictionary <string, int> trainers = new Dictionary <string, int>();

            trainers.Add(TrainerManager.NORMAL_TRAINERS, i_numTrainers);
            mTrainerData = new TrainerManager(new ViewModel(), CreateTrainerSaveData_WithCounts(trainers), new Dictionary <string, UnitProgress>());

            int             costForNextTrainer = mTrainerData.GetNextTrainerCost();
            NormalInventory realInventory      = new NormalInventory();

            realInventory.SetResource(VirtualCurrencies.GOLD, costForNextTrainer);

            bool canAfford = mTrainerData.CanAffordTrainerPurchase(realInventory);

            Assert.IsTrue(canAfford);
        }
Example #2
0
        public void CannotAffordNewTrainer_EmptyInventory()
        {
            bool canAfford = mTrainerData.CanAffordTrainerPurchase(new EmptyInventory());

            Assert.IsFalse(canAfford);
        }