public void UserSerializationTest() { //Getting user applicaitondata folder. string LocalAppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); string programFolder = System.IO.Path.Combine(LocalAppDataPath, "Munchy"); //Data File Locations string userFile = System.IO.Path.Combine(programFolder, "USER.json"); string userFridgeFile = System.IO.Path.Combine(programFolder, "USER_FRIDGE.json"); string foodDefFile = System.IO.Path.Combine(programFolder, "FoodData.json"); string recipeDatabase = System.IO.Path.Combine(programFolder, "Recipes.json"); string recipeSaveFile = System.IO.Path.Combine(programFolder, "RecipeSavesFile.json"); string statSavePath = System.IO.Path.Combine(programFolder, "StatSavePath.json"); string m_ShoppingListFile = System.IO.Path.Combine(programFolder, "ShoppingList.json"); ProgramManager currentManager = new ProgramManager(userFile, userFridgeFile, recipeDatabase, foodDefFile, recipeSaveFile, statSavePath, m_ShoppingListFile); List <string> preferences = new List <string> { "isvegan", "isvegetarian", "isdiabetic", "eggs", "dairy", "fish", "nuts", "gluten", "soy" }; currentManager.User.UserName = "******"; currentManager.User.Age = 17; currentManager.User.Weight = 89; currentManager.User.Sex = "male"; currentManager.User.LanguagePref = "EN"; currentManager.User.Preferences = preferences; currentManager.SaveUser(); UserTemplate newUser = currentManager.GetUser(); Assert.IsTrue(newUser.UserName == "Nikola"); Assert.IsTrue(newUser.Age == 17); Assert.IsTrue(newUser.Weight == 89); Assert.IsTrue(newUser.Sex == "male"); Assert.IsTrue(newUser.LanguagePref == "EN"); Assert.IsTrue(newUser.Preferences.Count == preferences.Count); }