示例#1
0
        public void should_construct_graph_and_auto_properties()
        {
            var registry = new BlueprintRegistry();

            registry.Register <IFoo, Foo>();
            registry.Register <IBar, Bar>();
            var construktion = new Construktion().AddRegistry(registry);

            var bar = construktion.Construct <IBar>();

            bar.Name.ShouldNotBeNullOrWhiteSpace();
            bar.Age.ShouldNotBe(0);
            bar.Foo.Name.ShouldNotBeNullOrWhiteSpace();
            bar.Foo.Age.ShouldNotBe(0);
        }