Esempio n. 1
0
        public void Filter_can_reject_properties()
        {
            var props = new Properties {
                { "accept", "me" },
                { "reject", "others" },
            };
            var pp = PropertyProvider.Filter(props, p => p == "accept");

            Assert.False(pp.TryGetProperty("reject", null, out _));
            Assert.Equal(null, pp.GetPropertyType("reject"));
        }
Esempio n. 2
0
        public void Filter_can_accept_properties()
        {
            var props = new Properties {
                { "accept", "me" },
                { "reject", "others" },
            };
            var pp = PropertyProvider.Filter(props, p => p == "accept");

            Assert.Equal("me", pp.GetProperty("accept"));
            Assert.Equal(typeof(string), pp.GetPropertyType("accept"));
        }