예제 #1
0
        public void WhenCreating_PropertiesSetToExpectedValues()
        {
            MockPlayerManager.Gold.Returns(100);
            MockTreasureManager.GetPlayerTreasureLevel().Returns(11);
            MockTreasureManager.GetPlayerTreasureLevelProgress().Returns(0.5f);

            PlayerSummaryPM systemUnderTest = CreateSystem();

            Assert.AreEqual("100", systemUnderTest.ViewModel.GetPropertyValue <string>(PlayerSummaryPM.GOLD_PROPERTY));
            Assert.AreEqual("11", systemUnderTest.ViewModel.GetPropertyValue <string>(PlayerSummaryPM.TREASURE_LEVEL_PROPERTY));
            Assert.AreEqual(0.5f, systemUnderTest.ViewModel.GetPropertyValue <float>(PlayerSummaryPM.TREASURE_LEVEL_PROGRESS_PROPERTY));
        }
예제 #2
0
 private void SetTreasureLevelProperty()
 {
     ViewModel.SetProperty(TREASURE_LEVEL_PROPERTY, mTreasureManager.GetPlayerTreasureLevel().ToString());
 }