示例#1
0
        public void VerifyStatName_MatchesCalculator()
        {
            string          statName           = "TestStatName";
            IStatCalculator mockStatCalculator = Substitute.For <IStatCalculator>();

            mockStatCalculator.GetStatName(Arg.Any <string>()).Returns(statName);

            UnitStatPM testPM = new UnitStatPM(Substitute.For <IUnit>(), "TestStat", mockStatCalculator);

            Assert.AreEqual(testPM.ViewModel.GetPropertyValue <string>(UnitStatPM.STAT_NAME_PROPERTY), statName);
        }
示例#2
0
 private void SetStatNameProperty()
 {
     ViewModel.SetProperty(STAT_NAME_PROPERTY, mStatCalculator.GetStatName(Stat));
 }