public void Setup()
        {
            _db = global::Sitecore.Configuration.Factory.GetDatabase("master");
            Context context = new Context(
                new AttributeConfigurationLoader(
                    "Glass.Sitecore.Mapper.Tests.Domain,  Glass.Sitecore.Mapper.Tests"), null);

            _service = new SitecoreService(_db);

            _handler = new SitecoreQueryHandler();

            _item = _db.GetItem("/sitecore/content/Data/SitecoreQueryHandler");
        }
        public void ParseQuery_ReplacesParameters()
        {
            //Assign
            SitecoreQueryHandler handler = new SitecoreQueryHandler();
            string query = "/sitecore/content/home/*[@@id='{id}']";

            //Act
            var result = handler.ParseQuery(query, _item);

            //Assert
            string expected = "/sitecore/content/home/*[@@id='" + _item.ID.ToString() + "']";

            Assert.AreEqual(expected, result);
        }