public void GetValue_ReturnsItemFullPath() { //Assign var param = new ItemIdParameter(); var item = Database.GetItem("/sitecore/content/Tests/DataMappers/SitecoreQueryParameters/ItemIdParameter"); //Act var result = param.GetValue(item); //Assert Assert.AreEqual("{DF486E14-EE4D-472A-BD8C-8BBD4C468A2D}", result); }
public void GetValue_ReturnsItemFullPath() { //Assign using (Db database = new Db { new Sitecore.FakeDb.DbItem("Target") }) { var param = new ItemIdParameter(); var item = database.GetItem("/sitecore/content/Target"); //Act var result = param.GetValue(item); //Assert Assert.AreEqual(item.ID.Guid.ToString("B").ToUpper(), result); } }