public void set_the_list_value_when_the_attribute_only_has_the_key_value()
        {
            var att = new SelectionValuesAttribute("names");
            att.SetList(fixture, cell);

            cell.SelectionValues.ShouldHaveTheSameElementsAs("Jeremy", "Max", "Monte");
        }
        public void set_the_list_value_when_the_attribute_has_an_enum_type()
        {
            var att = new SelectionValuesAttribute(typeof(TestEnum));
            att.SetList(fixture, cell);

            cell.SelectionValues.ShouldHaveTheSameElementsAs("One", "Two", "Three");
        }
        public void set_the_list_value_when_the_attribute_has_the_values_set_explicitly()
        {
            var att = new SelectionValuesAttribute("Mork", "Mindy");
            att.SetList(fixture, cell);

            cell.SelectionValues.ShouldHaveTheSameElementsAs("Mork", "Mindy");
        }
Beispiel #4
0
        private void readAttributes(ICustomAttributeProvider parameter)
        {
            parameter.ForAttributes <ICellModifier>(x => x.Modify(this));
            MethodExtensions.ForAttribute <SelectionValuesAttribute>(parameter, att => _selectionAttribute = att);

            readType();
        }