public void Contains_should_return_false_if_key_does_not_exist() { //Arrange var table = new Structures.HashTable <int, string>(); table.Add(1, "1"); //Act var result = table.Contains(2); //Assert Assert.False(result); }
public void Set_should_remove_entry_by_key_if_value_is_null() { //Arrange var table = new Structures.HashTable <int, string>(); table.Add(1, "1"); //Act table[1] = null; //Act & Assert Assert.False(table.Contains(1)); }
public void Contains_should_return_true_if_key_exists() { //Arrange var table = new Structures.HashTable <int, string>(); table.Add(1, "1"); //Act var result = table.Contains(1); //Assert Assert.True(result); }