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

TestDictionaryTryGetValue() private method

private TestDictionaryTryGetValue ( ) : void
return void
        public void TestDictionaryTryGetValue()
        {
            AssertDictionaryException(delegate(IDictionary<string, string> dict)
            {
                string value;
                // ReSharper disable AssignNullToNotNullAttribute
                // This is sort of the point.
                dict.TryGetValue(null, out value);
                // ReSharper restore AssignNullToNotNullAttribute
            }, new string[] { "null", "key" });
            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.");
            });
        }