public void op_TryValueOfString_string()
        {
            const string expected = "value";
            var          obj      = new KeyStringDictionary
            {
                new KeyStringPair("key", expected)
            };

            var actual = obj.TryValue <string>("key");

            Assert.Equal(expected, actual);
        }
        public void op_TryValueOfInt32_string()
        {
            const int expected = 123;
            var       obj      = new KeyStringDictionary
            {
                new KeyStringPair("key", XmlConvert.ToString(expected))
            };

            var actual = obj.TryValue <int>("key");

            Assert.Equal(expected, actual);
        }
        public void op_TryValueOfDateTime_string()
        {
            var expected = DateTime.UtcNow;
            var obj      = new KeyStringDictionary
            {
                new KeyStringPair("key", expected.ToXmlString())
            };

            var actual = obj.TryValue <DateTime>("key");

            Assert.Equal(expected, actual);
        }
        public void op_TryValueOfString_string_string(string expected,
                                                      string value,
                                                      string empty)
        {
            var obj = new KeyStringDictionary
            {
                new KeyStringPair("key", expected)
            };

            var actual = obj.TryValue("key", empty);

            Assert.Equal(expected, actual);
        }
        public void op_TryValueOfInt32_int_int(int expected,
                                               string value,
                                               int empty)
        {
            var obj = new KeyStringDictionary
            {
                new KeyStringPair("key", value)
            };

            var actual = obj.TryValue(0, empty);

            Assert.Equal(expected, actual);
        }