Exemplo n.º 1
0
        private void InitializeInfoDataManager(string fileName)
        {
            var infoDataManager = GetInfoDataManager();

            var infoData = IgnitionTestsHelper.PrepareInfoTestData(GetTestDataFilePath(fileName));

            foreach (var data in infoData)
            {
                infoDataManager.ProcessData(data);
            }
        }
        public void ZoneDataIsRead(string fileName, uint expectedGameId, string expectedName, GameType expectedGameType,
                                   GameLimit expectedLimit, int expectedSeats, bool isZone)
        {
            var infoData = IgnitionTestsHelper.PrepareInfoTestData(GetTestDataFilePath(fileName));

            // create mock for event aggregator
            var eventAggregator = Substitute.For <IEventAggregator>();

            var infoDataManager = new IgnitionInfoDataManagerStub(eventAggregator);

            foreach (var data in infoData)
            {
                infoDataManager.ProcessData(data);
            }

            var tableData = infoDataManager.GetTableData(expectedGameId);

            Assert.IsNotNull(tableData, "TableData must be found");
            Assert.That(tableData.TableName, Is.EqualTo(expectedName));
            Assert.That(tableData.GameType, Is.EqualTo(expectedGameType));
            Assert.That(tableData.GameLimit, Is.EqualTo(expectedLimit));
            Assert.That(tableData.TableSize, Is.EqualTo(expectedSeats));
            Assert.That(tableData.IsZone, Is.EqualTo(isZone));
        }