public FacetsConfig2 CreateSingleFacetsConfigWithoutPicks(string facetCode)
 {
     return(Create(
                facetCode,
                facetCode,
                new List <FacetConfig2>()
     {
         MockFacetConfigFactory.Create(Repository.GetByCode(facetCode), 0, new List <FacetConfigPick>())
     }
                ));
 }
        /// <summary>
        /// Creates a new FacesConfig instance based on given Uri template.
        ///     "target-facet[@trigger-facet]:(facet-code[@picks])(/facet-code[@picks])*"
        /// </summary>
        /// <param name="uri">
        /// String specification in format:
        ///
        ///   "target-facet[@trigger-facet]:(facet-code[@picks])(/facet-code[@picks])*"
        ///
        /// </param>
        /// <returns></returns>
        public FacetsConfig2 Create(string uri)
        {
            var config   = UriParser.Parse(uri);
            var position = 0;

            var facetConfigs = config
                               .FacetCodes
                               .Select(z => MockFacetConfigFactory.Create(GetFacet(z.Key), position++, z.Value))
                               .ToList();

            return(Create(
                       config.TargetCode,
                       config.TargetCode,
                       facetConfigs,
                       "populate",
                       config.Domain
                       ));
        }