public void ExtractValueShouldReturnItemPropertyValue() { var executer = new ExpressionNodeExecuterStub(Mock.Create<INodeVisitor>()); var data = new DummyData { Child = new DummyData { Value = "Value" } }; var result = executer.ExtractValue(SourceFieldSetNames.Item, "Child.Value", data); Assert.AreEqual("Value", result); }
public void ExtractValueForCurrentUserShouldReturnEventProvidedDataTest() { var executer = new ExpressionNodeExecuterStub(Mock.Create<INodeVisitor>()); ExpressionNodeExecuterBase.GetCurrentUserInfo += (sender, args) => { args.UserInfoValues["Path"] = "Value"; }; var result = executer.ExtractValue(SourceFieldSetNames.CurrentUserInfo, "Path", null); Assert.AreEqual("Value", result); }
public void ExtractValueShouldRaiseExceptionIfPathIsNull() { var executer = new ExpressionNodeExecuterStub(Mock.Create<INodeVisitor>()); var result = executer.ExtractValue(SourceFieldSetNames.Item, null, null); }