コード例 #1
0
        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);
        }
コード例 #2
0
        public void ShouldCreateRouterViaIoC()
        {
            IApplication app = new IoCApplication();

            app.CreateRouter().Should().NotBeNull().And.BeAssignableTo <CustomRouter>();
        }