Example #1
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
        }
Example #2
0
        public void IntegrationTest_GetGameFiles_v2()
        {
            var mockConfiguration = GetMockConfiguration();
            var azGameFileManager = new AzureGameFileManager(mockConfiguration);


            //azGameFileManager.DeleteGame(gameDetails[0].Name);
            var descriptor     = new GameDescriptor();
            var newfileInAzure = azGameFileManager.SaveGame(descriptor, "ListOfFilesTest.xml");

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

            azGameFileManager.DeleteGame("ListOfFilesTest.xml");
            var gameDetails1 = azGameFileManager.GetGameFiles().ToList();

            Assert.IsTrue(gameDetails0.Any(x => x.Name == "ListOfFilesTest.xml"));
            Assert.IsFalse(gameDetails1.Any(x => x.Name == "ListOfFilesTest.xml"));
        }