コード例 #1
0
        private void SetupConfig(UnitConfigTestData configData)
        {
            MockUnitConfig.Setup(config => config.CityRepairPercentPerTurn).Returns(configData.CityRepairPercentPerTurn);

            MockUnitConfig.Setup(config => config.ForeignNavalHealingPerTurn).Returns(configData.ForeignNavalHealingPerTurn);
            MockUnitConfig.Setup(config => config.FriendlyNavalHealingPerTurn).Returns(configData.FriendlyNavalHealingPerTurn);
            MockUnitConfig.Setup(config => config.GarrisonedNavalHealingPerTurn).Returns(configData.GarrisonedNavalHealingPerTurn);

            MockUnitConfig.Setup(config => config.ForeignLandHealingPerTurn).Returns(configData.ForeignLandHealingPerTurn);
            MockUnitConfig.Setup(config => config.FriendlyLandHealingPerTurn).Returns(configData.FriendlyLandHealingPerTurn);
            MockUnitConfig.Setup(config => config.GarrisonedLandHealingPerTurn).Returns(configData.GarrisonedLandHealingPerTurn);
        }
コード例 #2
0
        private void SetupConfig(UnitConfigTestData data)
        {
            MockUnitConfig.Setup(config => config.NextLevelExperienceCoefficient)
            .Returns(data.NextLevelExperienceCoefficient);

            MockUnitConfig.Setup(config => config.MaxLevel).Returns(data.MaxLevel);

            MockUnitConfig.Setup(config => config.MeleeAttackerExperience).Returns(data.MeleeAttackerExperience);
            MockUnitConfig.Setup(config => config.MeleeDefenderExperience).Returns(data.MeleeDefenderExperience);

            MockUnitConfig.Setup(config => config.RangedAttackerExperience).Returns(data.RangedAttackerExperience);
            MockUnitConfig.Setup(config => config.RangedDefenderExperience).Returns(data.RangedDefenderExperience);
        }