Exemplo n.º 1
0
        public void IntegrationTest_ReadGame()
        {
            var mockConfiguration = GetMockConfiguration();
            var azGameFileManager = new AzureGameFileManager(mockConfiguration);

            var descriptor = azGameFileManager.ReadGame("mygame.xml");

            Assert.IsTrue(descriptor.GoldMines.Count > 0); //TODO ASSERT Enought?
        }
Exemplo n.º 2
0
        public void IntegrationTest_SaveGame()
        {
            var mockConfiguration = GetMockConfiguration();
            var azGameFileManager = new AzureGameFileManager(mockConfiguration);

            var gameList0 = azGameFileManager.GetGameFiles().ToList();

            var descriptor     = azGameFileManager.ReadGame("mygame.xml");
            var newfileInAzure = azGameFileManager.SaveGame(descriptor, "SaveGameTest.xml");
            var gameList1      = azGameFileManager.GetGameFiles().ToList();

            azGameFileManager.DeleteGame("SaveGameTestTest.xml");

            var gameList2 = azGameFileManager.GetGameFiles().ToList();

            Assert.IsTrue(gameList1.Any(x => x.Name == "SaveGameTest.xml"));//TODO ASSERT
        }