/*--------------------------------------------------------------------------------------------*/ 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); }
public void PropertyNameInvalid() { vFuncProp = new WeaverStepProp <Person>(n => (n.PersonId == 99)); vFuncProp.Path = vMockPath.Object; WeaverTestUtil.CheckThrows <WeaverStepException>(true, () => { var p = vFuncProp.PropertyName; }); }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ 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; }
public void BuildParameterizedStringId() { vFuncProp = new WeaverStepProp <Person>(n => n.Id); vFuncProp.Path = vMockPath.Object; Assert.AreEqual("id", vFuncProp.BuildParameterizedString(), "Incorrect result."); }