Exemple #1
0
        public void RemovingOnePreferenceTest()
        {
            SqliteStorage storage = _storage;

            Assert.True(_storage.CreatePreferenceTable());

            UserPreference preference = new UserPreference("headphones");
            bool           result     = storage.InsertUserPreference(preference);

            Assert.True(result);

            result = storage.DeleteUserPreference(preference);
            Assert.True(result);
        }
Exemple #2
0
        public void RemovingNullPreferenceTest()
        {
            SqliteStorage storage = _storage;

            Assert.True(_storage.CreatePreferenceTable());

            bool result = storage.InsertUserPreference(new UserPreference("headphones"));

            Assert.True(result);

            Assert.Throws <ArgumentNullException>(() =>
            {
                storage.DeleteUserPreference(null);
            });

            Assert.Throws <ArgumentNullException>(() =>
            {
                storage.DeleteUserPreferences(null);
            });
        }