Azavea.Open.Common.Tests.CollectionTests.TestDictionaryBracketSet C# (CSharp) Method

TestDictionaryBracketSet() private method

private TestDictionaryBracketSet ( ) : void
return void
        public void TestDictionaryBracketSet()
        {
            AssertDictionaryException(delegate(IDictionary<string, string> dict)
            {
                // ReSharper disable AssignNullToNotNullAttribute
                // This is sort of the point.
                dict[null] = "one";
                // ReSharper restore AssignNullToNotNullAttribute
            }, new string[] { "null", "key", "set", "one"});
            AssertDictionaryNoException(delegate(IDictionary<string, string> dict)
            {
                dict.Clear();
                string value;
                dict.TryGetValue("notthere", out value);
                Assert.IsNull(value, "Value should be set to null now.");
            });
        }