public void SelectScalarValueUsingPocoScalarPathFromXml_Expected_ScalarValue() { string testData = GivenXml(); IPath namePath = new XmlPath("Company:Name", "Company:Name"); IDataBrowser dataBrowser = DataBrowserFactory.CreateDataBrowser(); object data = dataBrowser.SelectScalar(namePath, testData); Assert.AreEqual(data, "Dev2"); }
public void SelectScalarValueUsingJsonScalarPathFromJson_Expected_ScalarValue() { string testData = GivenJson(); IPath namePath = new JsonPath("Name", "Name"); IDataBrowser dataBrowser = DataBrowserFactory.CreateDataBrowser(); object data = dataBrowser.SelectScalar(namePath, testData); Assert.AreEqual(data, "Dev2"); }
public void SelectScalarValueUsingPocoScalarPathFromReferenceType_Expected_ScalarValue() { PocoTestData testData = GivenPoco(); IPath namePath = new PocoPath("Name", "Name"); IDataBrowser dataBrowser = DataBrowserFactory.CreateDataBrowser(); object data = dataBrowser.SelectScalar(namePath, testData); Assert.AreEqual(data, testData.Name); }