Ejemplo n.º 1
0
        public void WithNoSelectableAttributesTest()
        {
            AttributeHeuristic heuristic = new AttributeHeuristic();

            Type type = typeof(WithAttribute);
            var items = type.GetConstructors();

            bool selectable = heuristic.IsSelectable(items[0]);
            Assert.That(selectable, Is.False);
        }
Ejemplo n.º 2
0
        public void WithAttributesTest()
        {
            AttributeHeuristic heuristic = new AttributeHeuristic();

            Type type = typeof(WithAttribute);
            object[] attributes = type.GetCustomAttributes(false);

            bool selectable = heuristic.IsSelectable(attributes[0]);
            Assert.That(selectable, Is.True);
        }