Beispiel #1
0
        public void GetValue_ReturnsItemPath()
        {
            //Assign
            ItemPathParameter param = new ItemPathParameter();

            //Act
            var result = param.GetValue(_item);

            //Assert
            Assert.AreEqual(_item.Paths.FullPath, result);
        }
        public void GetValue_ReturnsItemFullPath()
        {
            //Assign
            var param = new ItemPathParameter();
            var item  = Database.GetItem("/sitecore/content/Tests/DataMappers/SitecoreQueryParameters/ItemPathParameter");

            //Act
            var result = param.GetValue(item);

            //Assert
            Assert.AreEqual(item.Paths.FullPath, result);
        }
        public void GetValue_ReturnsItemFullPath()
        {
            using (Db database = new Db
            {
                new Sitecore.FakeDb.DbItem("Target")
            })
            {
                //Assign
                var param = new ItemPathParameter();
                var item  = database.GetItem("/sitecore/content/Target");

                //Act
                var result = param.GetValue(item);

                //Assert
                Assert.AreEqual(item.Paths.FullPath, result);
            }
        }