public void ShouldReturnServiceWhenGetService() { using (var knifeHost = new KnifeHost(new string[0])) { var innerHost = knifeHost.GetRequiredService <IHost>(); innerHost.Should().NotBeNull(); } }
public void ShouldReturnServiceWhenGetService() { using (var knifeHost = new KnifeHost(new string[0])) { var innerHost = knifeHost.GetRequiredService <IHost>(); Assert.IsNotNull(innerHost); } }
public void ShouldCanBeStopedWhenRun() { using (var knifeHost = new KnifeHost(new string[0])) { var appLiftTime = knifeHost.GetRequiredService <IHostApplicationLifetime>(); Task.Delay(500).ContinueWith(_ => { appLiftTime.StopApplication(); }); knifeHost.Run(); } }
public void ShouldCreateANewInstanceWhenCallCtor() { using (var host = new KnifeHost()) { } }