public ListElement(int i)
 {
     Int         = i;
     NullableInt = i;
     String      = i.ToString();
     XNode       = new NotXText(i.ToString());
     Random      = new Random();
     ByteArray   = new[] { (byte)i, (byte)i, (byte)i, (byte)i };
 }
        Attempt_to_AddNew_on_set_for_type_without_parameterless_constructor_works_if_AddingNew_event_is_used_to_create_new_object()
        {
            var obbl = new ObservableBackedBindingList <NotXText>(new ObservableHashSet <NotXText>());
            var item = new NotXText("Some Value");

            obbl.AddingNew += (s, e) => e.NewObject = item;
            obbl.AddNew();
            obbl.EndNew(0);

            Assert.True(obbl.Contains(item));
        }
        public void Attempt_to_AddNew_on_set_for_abstract_type_works_if_AddingNew_event_is_used_to_create_new_object()
        {
            var obbl = new ObservableBackedBindingList <NotXNode>(new ObservableHashSet <NotXNode>());
            var item = new NotXText("Some Value");

            obbl.AddingNew += (s, e) => e.NewObject = item;
            obbl.AddNew();
            obbl.EndNew(0);

            Assert.True(obbl.Contains(item));
        }