public PowerGuideAuthenticationClientTest() { JsonSerializerConfigurer.ConfigureDefault(); client = new PowerGuideAuthenticationClientImpl(new PowerGuideClientImpl(apiClient)); A.CallTo(() => apiClient.HttpClient).Returns(new HttpClient(httpMessageHander)); A.CallTo(() => apiClient.ContentHandlers).Returns(contentHandlers); }
public static int Main() { JsonSerializerConfigurer.configureDefault(); using IContainer container = ContainerFactory.createContainer(); using ILifetimeScope scope = container.BeginLifetimeScope(); var energyReporter = scope.Resolve <EnergyReporter>(); var options = scope.Resolve <Options>(); configureLogging(options.skipUtility); Task <int> start = options.skipUtility ? energyReporter.sendSolarReport() : energyReporter.sendSolarAndUtilityReport(); // block program from exiting until `start` completes int result = start.GetAwaiter().GetResult(); return(result); }