public static void RecordMetrics() { var webClient = new SimpleWebClient(); var feedlyInquisitor = new FeedlyInquisitor(webClient); var alexaInquisitor = new AlexaDataInquisitor(webClient); var mozInquisitor = new MozInquisitor(new CredentialStore(File.ReadAllText(@"CredFiles\moz.cred")), webClient) { Timeout = 10 }; var metricsRecorder = new BlogMetricsRecorder(feedlyInquisitor, alexaInquisitor, mozInquisitor); using (var context = new BlogContext()) { var blogs = context.Blogs.ToList(); var blogMetrics = metricsRecorder.GenerateMetrics(blogs); context.BlogMetrics.AddRange(blogMetrics); context.SaveChanges(); } }
public void BeforeEachTest() { Client.Arrange(cl => cl.GetRawResultOfBasicGetRequest("http://data.alexa.com/data?cli=10&dat=snbamz&url=daedtech.com")).Returns(Response); Target = new AlexaDataInquisitor(Client); }