コード例 #1
0
 public void CreateMethodCalledWithAppAndProperties()
 {
     var serverFactory = new CreatePatternOne();
     var adapter = new ServerFactoryAdapter(serverFactory);
     IAppBuilder builder = new AppBuilderFactory().Create();
     IDisposable disposable = adapter.Create(builder);
     builder.Properties["called"].ShouldBe(serverFactory);
     builder.Properties["app"].ShouldNotBe(null);
     builder.Properties["properties"].ShouldBeSameAs(builder.Properties);
     disposable.ShouldBe(serverFactory);
 }
コード例 #2
0
        public void CreateMethodCalledWithAppAndProperties()
        {
            var         serverFactory = new CreatePatternOne();
            var         adapter       = new ServerFactoryAdapter(serverFactory);
            IAppBuilder builder       = new AppBuilderFactory().Create();
            IDisposable disposable    = adapter.Create(builder);

            builder.Properties["called"].ShouldBe(serverFactory);
            builder.Properties["app"].ShouldNotBe(null);
            builder.Properties["properties"].ShouldBeSameAs(builder.Properties);
            disposable.ShouldBe(serverFactory);
        }