public TemplateCommandMiddleware(TemplatesClient templatesClient, IOptions <TemplatesOptions> templateOptions, IUrlGenerator urlGenerator,
                                         ISemanticLog log)
        {
            this.templatesClient = templatesClient;
            this.templateOptions = templateOptions.Value;
            this.urlGenerator    = urlGenerator;

            this.log = log;
        }
Beispiel #2
0
        public TemplatesClientTests()
        {
            var httpClientFactory = A.Fake <IHttpClientFactory>();

            A.CallTo(() => httpClientFactory.CreateClient(null))
            .Returns(new HttpClient());

            sut = new TemplatesClient(httpClientFactory, Options.Create(new TemplatesOptions
            {
                Repositories = new[]
                {
                    new TemplateRepository
                    {
                        ContentUrl = "https://raw.githubusercontent.com/Squidex/templates/main"
                    }
                }
            }));
        }