Example #1
0
        public ISkinDefinitionBuilder GetSkinDefinitionBuilder(BrandEntity brand, SkinEntity skin, ABTestCaseDescriptor abTestDescriptor)
        {
            var             clientBuilder  = GetClientUrlBuilder(brand, skin);
            IPreloaderSetup preloaderSetup = GetPreloaderSetup(brand, skin);

            var files = CreateFiles(preloaderSetup.GetFileDescriptors(brand, skin),
                                    clientBuilder.BuildBaseUrl(abTestDescriptor?.Test),
                                    new SkinCode(brand.Id, skin.Id),
                                    abTestDescriptor?.Test);

            return(new SkinDefinitionBuilder(clientBuilder.GetVersion(abTestDescriptor?.Test), CreateParser(files), CreateConverer(files)));
        }
Example #2
0
        private ABTestCaseSet[] FindABTestCases(BrandEntity brand, SkinEntity skin, IPreloaderSetup preloaderSetup)
        {
            var abTestConfigurationReader = CreateJsonABTestingConfigurationReader(brand, skin, preloaderSetup);

            var abTestConfiguration = abTestConfigurationReader.Read(brand.CDNUrl);

            if (abTestConfiguration == null)
            {
                return(new ABTestCaseSet[0]);
            }

            return(abTestConfiguration.GetApplicableTestCases(new SkinCode(brand.Id, skin.Id)));
        }
Example #3
0
 private JsonABTestingConfigurationReader CreateJsonABTestingConfigurationReader(BrandEntity brand, SkinEntity skin, IPreloaderSetup preloaderSetup)
 {
     return(new JsonABTestingConfigurationReader(_serviceLocator.GetInstance <IWebClientFactory>(),
                                                 preloaderSetup.GetNavigationPlanPath(brand, skin)));
 }
Example #4
0
 public JsonClientUrlBuilder(PathDescriptor cdnUrl, SkinCode skinCode, string version, IPreloaderSetup preloaderSetup)
     : base(cdnUrl, skinCode, version)
 {
     _preloaderSetup = preloaderSetup;
 }
Example #5
0
 public JsonClientUrlBuilderFactory(IWebClientFactory webClientFactory, IPreloaderSetup preloaderSetup)
     : base(webClientFactory)
 {
     _preloaderSetup = preloaderSetup;
 }