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() { Target = new BlogMetricsRecorder(FeedlyInquisitor, AlexaInquisitor, MozInquisitor); }