public void ShouldBeAbleToUseWithToSetPrivateProperties()
        {
            using (mocks.Record())
                objectBuilder.Expect(x => x.Do(new Action <MyClass>(a => a.StringOne = ""))).IgnoreArguments().Return(objectBuilder);

            using (mocks.Playback())
                SingleObjectBuilderExtensions.With(objectBuilder, propertyExpression, 100);
        }
        public void ShouldBeAbleToUseWith()
        {
            using (mocks.Record())
                objectBuilder.Expect(x => x.With(func)).Return(objectBuilder);

            using (mocks.Playback())
                SingleObjectBuilderExtensions.With(objectBuilder, func);
        }
Ejemplo n.º 3
0
        public void ShouldBeAbleToUseWithToSetPrivateProperties()
        {
            objectBuilder.Do(new Action <MyClass>(a => a.StringOne = "")).Returns(objectBuilder);

            SingleObjectBuilderExtensions.With(objectBuilder, propertyExpression, 100);
        }
Ejemplo n.º 4
0
        public void ShouldBeAbleToUseWith()
        {
            objectBuilder.With(func).Returns(objectBuilder);

            SingleObjectBuilderExtensions.With(objectBuilder, func);
        }