Ejemplo n.º 1
0
        public TreasureSetPM(ITreasureSetData i_data, ITreasurePM_Spawner i_spawner, IStringTableManager i_stringTableManager)
        {
            StringTableManager = i_stringTableManager;
            TreasurePM_Spawner = i_spawner;
            mData = i_data;

            SetNameProperty();
            CreateTreasurePMs();
        }
Ejemplo n.º 2
0
        public void WhenCreating_TreasurePMsList_AsExpected()
        {
            ITreasurePM_Spawner mockSpawner = Substitute.For <ITreasurePM_Spawner>();
            ITreasureSetData    mockData    = Substitute.For <ITreasureSetData>();

            mockData.GetTreasuresInSet().Returns(new List <string>()
            {
                "1", "2", "3"
            });

            TreasureSetPM systemUnderTest = new TreasureSetPM(mockData, mockSpawner, Substitute.For <IStringTableManager>());

            Assert.AreEqual(3, systemUnderTest.TreasurePMs.Count);
        }
Ejemplo n.º 3
0
        public void WhenCreating_NameProperty_SetAsExpected()
        {
            ITreasurePM_Spawner mockSpawner = Substitute.For <ITreasurePM_Spawner>();
            ITreasureSetData    mockData    = Substitute.For <ITreasureSetData>();

            mockData.GetId().Returns("Test");
            IStringTableManager mockStringTable = Substitute.For <IStringTableManager>();

            mockStringTable.Get("Test_Name").Returns("FakeName");

            TreasureSetPM systemUnderTest = new TreasureSetPM(mockData, mockSpawner, mockStringTable);

            Assert.AreEqual("FakeName", systemUnderTest.ViewModel.GetPropertyValue <string>(TreasureSetPM.NAME_PROPERTY));
        }
Ejemplo n.º 4
0
 public ITreasureSetPM Create(ITreasureSetData i_data)
 {
     return(factory.Create(i_data));
 }