protected ProviderCommandCoreTests(ProviderService providerService, ITestOutputHelper outputHelper) { ProviderService = providerService ?? throw new ArgumentNullException(nameof(providerService)); Logger = XUnitLogger.Create(GetType(), outputHelper); Test = outputHelper.GetTest(); configuration = new Lazy <IConfiguration>(() => BuildConfiguration(new ConfigurationBuilder())); }
public void GetTest() { // arrange var logger = XUnitLogger.Create <EchoController>(this.testOutputHelper); var sut = new EchoController(logger); // act var result = sut.Get(); // assert result.ShouldNotBeNull(); }
public async Task GetTest() { // arrange var logger = XUnitLogger.Create <SystemInformationController>(this.testOutputHelper); var sut = new SystemInformationController(logger); // act var result = await sut.Get().AnyContext(); // assert result.ShouldNotBeNull(); }