[Test]         // #373
        public void object_to_kv_ignores_props_not_publicly_readable()
        {
            var kv = new ToKvMe {
                PrivateRead2 = "foo",
                WriteOnly    = "a,b"
            }.ToKeyValuePairs();

            AssertKV(kv, ("Read1", "a"), ("Read2", "b"));
        }
Exemple #2
0
        [Test]         // #373
        public void object_to_kv_ignores_props_not_publicly_readable()
        {
            var kv = new ToKvMe {
                PrivateRead2 = "foo",
                WriteOnly    = "a,b"
            }.ToKeyValuePairs();

            CollectionAssert.AreEquivalent(new Dictionary <string, object> {
                { "Read1", "a" },
                { "Read2", "b" }
            }, kv);
        }