コード例 #1
0
        public void NonExistantValuesCanBeRemovedWithoutSideEffects()
        {
            UserDataCollection collection = new UserDataCollection();

            collection.RemoveValue(new Key <int>("key"));
            Assert.IsFalse(collection.HasValue(new Key <int>("key")));
        }
コード例 #2
0
        public void ExistingValuesCanBeRemoved()
        {
            UserDataCollection collection = new UserDataCollection();

            collection.SetValue(new Key <int>("key"), 123);
            Assert.IsTrue(collection.HasValue(new Key <int>("key")));
            collection.RemoveValue(new Key <int>("key"));
            Assert.IsFalse(collection.HasValue(new Key <int>("key")));
        }
コード例 #3
0
 public void ExistingValuesCanBeRemoved()
 {
     UserDataCollection collection = new UserDataCollection();
     collection.SetValue(new Key<int>("key"), 123);
     Assert.IsTrue(collection.HasValue(new Key<int>("key")));
     collection.RemoveValue(new Key<int>("key"));
     Assert.IsFalse(collection.HasValue(new Key<int>("key")));
 }
コード例 #4
0
 public void NonExistantValuesCanBeRemovedWithoutSideEffects()
 {
     UserDataCollection collection = new UserDataCollection();
     collection.RemoveValue(new Key<int>("key"));
     Assert.IsFalse(collection.HasValue(new Key<int>("key")));
 }