public void GetValue_ReturnsItemFullPath() { //Assign var param = new ItemEscapedPathParameter(); var item = Database.GetItem("/sitecore/content/Tests/DataMappers/SitecoreQueryParameters/ItemEscapedPathParameter"); //Act var result = param.GetValue(item); //Assert Assert.AreEqual("/#sitecore#/#content#/#Tests#/#DataMappers#/#SitecoreQueryParameters#/#ItemEscapedPathParameter#", result); }
public void GetValue_ReturnsItemFullPath() { //Assign using (Db database = new Db { new Sitecore.FakeDb.DbItem("Target") }) { var param = new ItemEscapedPathParameter(); var item = database.GetItem( "/sitecore/content/Target"); //Act var result = param.GetValue(item); //Assert Assert.AreEqual( "/#sitecore#/#content#/#Target#", result); } }