Esempio n. 1
0
        public void RetievePreferencesTest()
        {
            SqliteStorage storage = _storage;

            Assert.True(_storage.CreateTables());

            List <UserPreference> preferences = new List <UserPreference>();

            preferences.Add(new UserPreference("movies", 0.0, 0.0));
            preferences.Add(new UserPreference("games", 0.0, 100.0));

            bool result = storage.InsertUserPreferences(preferences);

            Assert.True(result);

            List <UserPreference> myPreferences = storage.GetUserPreferences();

            Assert.True(myPreferences.Count == preferences.Count);

            for (int i = 0; i < myPreferences.Count; i++)
            {
                Assert.Equal(preferences[i], myPreferences[i]);
            }
        }