示例#1
0
        public async Task ExtractTargetTest()
        {
            HttpExtractor httpExtractor = new HttpExtractor(userAgentPool, storage);
            await httpExtractor.ExtractTarget(parameter, path);

            FileInfo fileInfo = new FileInfo(Path.Combine(ConstVariable.ApplicationPath, "httpExtractorFile.txt"));

            Assert.True(fileInfo.Exists);
            Assert.NotEqual(0, fileInfo.Length);
            File.Delete(fileInfo.FullName);
            Assert.Equal(userAgentPool, httpExtractor.UserAgentPool);
            Assert.Equal(storage, httpExtractor.Storage);
        }
示例#2
0
 public BaseProxy(HttpExtractor Extractor)
 {
     this.Extractor = Extractor;
     this.Domain    = Extractor.ExtractDomain(HttpContext.Current);
     this.Token     = Extractor.ExtractBearerToken(HttpContext.Current);
 }
示例#3
0
 public AccountsProxy(HttpExtractor Extractor) : base(Extractor)
 {
     this.Domain = "https://127.0.0.1:59310/";
 }
示例#4
0
 public BrokerServicesProxy(HttpExtractor Extractor, string ServiceURL) : base(Extractor)
 {
     this.Domain = ServiceURL;
 }