public void ShouldReturnNullOrErrorOnIocCorrectly() { IApplication app = new IoCApplication(); app.CreateInstance(Class.GetClass <IConfigurationProvider>(), true); new Action(() => app.CreateInstance(Class.GetClass <IConfigurationProvider>(), false)).ShouldThrow <Exception>(); app.Mode.Should().Be(ApplicationMode.Test); app.RootDirectory.Should().Be(Environment.CurrentDirectory); }
public void ShouldCreateRouterViaIoC() { IApplication app = new IoCApplication(); app.CreateRouter().Should().NotBeNull().And.BeAssignableTo <CustomRouter>(); }