Ejemplo n.º 1
0
        public void ContainsKey_KeyExists_ReturnsTrue()
        {
            var dict = new OneToManyDictionary <string, int>();

            dict.Add("key", 42);
            Assert.IsTrue(dict.ContainsKey("key"));
        }
Ejemplo n.º 2
0
        public void Remove_KeyExists_RemovesAllItems()
        {
            var dict = new OneToManyDictionary <string, int>();

            dict.Add("key", 42);
            dict.Add("key", 43);

            dict.Remove("key");

            Assert.IsFalse(dict.ContainsKey("key"));
        }
Ejemplo n.º 3
0
        public void ContainsKey_KeyNotFound_ReturnsFalse()
        {
            var dict = new OneToManyDictionary <string, int>();

            Assert.IsFalse(dict.ContainsKey("key"));
        }
		public void Remove_KeyExists_RemovesAllItems()
		{
			var dict = new OneToManyDictionary<string, int>();
			dict.Add("key", 42);
			dict.Add("key", 43);

			dict.Remove("key");

			Assert.IsFalse(dict.ContainsKey("key"));
		}
		public void ContainsKey_KeyExists_ReturnsTrue()
		{
			var dict = new OneToManyDictionary<string, int>();
			dict.Add("key", 42);
			Assert.IsTrue(dict.ContainsKey("key"));
		}
		public void ContainsKey_KeyNotFound_ReturnsFalse()
		{
			var dict = new OneToManyDictionary<string, int>();
			Assert.IsFalse(dict.ContainsKey("key"));
		}