public override void establish_context()
            {
                property = ReflectionHelper.GetAccessor((Expression<Func<ListEntity, IEnumerable<string>>>)(x => x.GetterAndSetter));
                target = new ListEntity();

                sut = new ReferenceBag<ListEntity, string>(property, new[] { "foo", "bar", "baz" });
            }
Beispiel #2
0
        public override void establish_context()
        {
            property = ReflectionHelper.GetAccessor (GetPropertyExpression ());
            target = new ListEntity();

            listItems = new[] {"foo", "bar", "baz"};
            sut = new List<ListEntity, string>(property, listItems);
        }
Beispiel #3
0
        public override void establish_context()
        {
            property = ReflectionHelper.GetAccessor((Expression<Func<ListEntity, IEnumerable>>)(x => x.List));
            target = new ListEntity();

            sut = new List<ListEntity, string>(property, new[] {"foo", "bar", "baz"});

            target.List = new List<string> {"foo", "bar", "baz"};
        }
        public override void establish_context()
        {
            property = ReflectionHelper.GetProperty((Expression<Func<ListEntity, IEnumerable<string>>>)(x => x.TypedSet));
            target = new ListEntity();

            sut = new List<ListEntity, string>(property, new[] {"foo", "bar", "baz"});

            target.TypedSet.AddAll(new[] {"foo", "bar", "baz"});
        }