Exemplo n.º 1
0
        public async Task Initialize()
        {
            HttpClientGetStringSucceeds = true;
            var factory = new FakeHttpClientFactory(() => HttpClientGetStringSucceeds);

            WakekApplication = new WakekTestApplication(factory);
            await WakekApplication.SetBenchmarkDefinitionsAsync();

            ExecuteCommand = new ExecuteCommand(WakekApplication, Container.Resolve <IBenchmarkExecutionFactory>(), Container.Resolve <IXmlSerializer>(),
                                                Container.Resolve <ITelemetryDataReader>(), factory);
            var applicationCommandExecutionContextMock = new Mock <IApplicationCommandExecutionContext>();

            applicationCommandExecutionContextMock.Setup(a => a.ReportAsync(It.IsAny <IFeedbackToApplication>()))
            .Returns <IFeedbackToApplication>(async f => await WakekApplication.HandleFeedbackToApplicationAsync(f));
            ApplicationCommandExecutionContext = applicationCommandExecutionContextMock.Object;
        }
Exemplo n.º 2
0
 public async Task Initialize()
 {
     Sut = new WakekTestApplication(null);
     await Sut.SetBenchmarkDefinitionsAsync();
 }