private void CreateBeanPathOnErrorMessages(XmlToModelResult result, object messageBean) { // would be nice to push this entire method into XmlToModelResult, but BeanUtil not visible from XmlToModelResult // (and moving classes or adding a dependency causes all sorts of problems) foreach (Hl7Error hl7Error in result.GetHl7Errors()) { string beanPath = BeanUtil.DescribeBeanPath(messageBean, hl7Error.GetPath()); hl7Error.SetBeanPath(beanPath); } }
public virtual void ShouldHandleComplexPathEndingInNullProperty() { string result = BeanUtil.DescribeBeanPath(this.testBean, "/MOCK_IN123456CA/theType/component/subject3/name"); Assert.AreEqual(PropertyPath.ToPath("MockMessageBean.type.name"), result); }
public virtual void ShouldHandleComplexPathWithoutMessageBean() { string result = BeanUtil.DescribeBeanPath(this.testBean, "theType/component/subject3/name"); Assert.AreEqual(PropertyPath.ToPath("MockMessageBean.type.name"), result); }
public virtual void ShouldHandleSimplePath() { string result = BeanUtil.DescribeBeanPath(this.testBean, "/MOCK_IN123456CA/theType"); Assert.AreEqual(PropertyPath.ToPath("MockMessageBean.type"), result); }
public virtual void ShouldHandlePathNotFound() { Assert.AreEqual(PropertyPath.ToPath("MockMessageBean"), BeanUtil.DescribeBeanPath(this.testBean, "/aNotFound/b/c")); }
public virtual void ShouldHandleEmptyPath() { Assert.AreEqual(string.Empty, BeanUtil.DescribeBeanPath(new object(), " ")); }
public virtual void ShouldHandleNullBean() { Assert.AreEqual(string.Empty, BeanUtil.DescribeBeanPath(null, "/a/b/c")); }