Esempio n. 1
0
        /*--------------------------------------------------------------------------------------------*/
        public static IWeaverPathPipeEnd Property <T>(this T pElem,
                                                      Expression <Func <T, object> > pProperty) where T : IWeaverElement
        {
            var f = new WeaverStepProp <T>(pProperty);

            pElem.Path.AddItem(f);
            return(f);
        }
Esempio n. 2
0
        public void PropertyNameInvalid()
        {
            vFuncProp      = new WeaverStepProp <Person>(n => (n.PersonId == 99));
            vFuncProp.Path = vMockPath.Object;

            WeaverTestUtil.CheckThrows <WeaverStepException>(true, () => {
                var p = vFuncProp.PropertyName;
            });
        }
Esempio n. 3
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        protected override void SetUp()
        {
            base.SetUp();

            vMockPath = new Mock <IWeaverPath>();
            vMockPath.SetupGet(x => x.Config).Returns(WeavInst.Config);

            vFuncProp      = new WeaverStepProp <Person>(n => n.PersonId);
            vFuncProp.Path = vMockPath.Object;
        }
Esempio n. 4
0
 public void BuildParameterizedStringId()
 {
     vFuncProp      = new WeaverStepProp <Person>(n => n.Id);
     vFuncProp.Path = vMockPath.Object;
     Assert.AreEqual("id", vFuncProp.BuildParameterizedString(), "Incorrect result.");
 }