public void GetValue_ReturnsDateNow()
        {
            //Assign
            ItemDateNowParameter param = new ItemDateNowParameter();

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

            //Assert
            Assert.IsTrue(new Regex(@"\d{8}T\d{6}").IsMatch(result));
        }
        public void GetValue_ReturnsItemFullPath()
        {
            //Assign
            var param = new ItemDateNowParameter();
            var item  = Database.GetItem("/sitecore/content/Tests/DataMappers/SitecoreQueryParameters/ItemEscapedPathParameter");

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

            //Assert
            Assert.AreEqual(Sitecore.DateUtil.ToIsoDate(DateTime.Now), result);
        }
        public void GetValue_ReturnsDateNow()
        {
            //Assign
            ItemDateNowParameter param = new ItemDateNowParameter();

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

            //Assert
            Assert.IsTrue(new Regex(@"\d{8}T\d{6}").IsMatch(result));

        }
        public void GetValue_ReturnsItemFullPath()
        {
            //Assign
            using (Db database = new Db
            {
                new Sitecore.FakeDb.DbItem("Target")
            })
            {
                var param = new ItemDateNowParameter();
                var item  =
                    database.GetItem(
                        "/sitecore/content/Target");

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

                //Assert
                Assert.AreEqual(Sitecore.DateUtil.ToIsoDate(DateTime.Now), result);
            }
        }