public void should_match_class_with_non_default_ctor() { var blueprint = new ComplexClassBlueprint(); var matches = blueprint.Matches(new ConstruktionContext(typeof(NonEmptyCtor))); matches.ShouldBe(true); }
public void should_construct_ctor_arg_and_properties() { var blueprint = new ComplexClassBlueprint(); var bar = (NonEmptyCtor)blueprint.Construct(new ConstruktionContext(typeof(NonEmptyCtor)), new DefaultConstruktionPipeline()); bar.Name.ShouldNotBeNullOrWhiteSpace(); bar.Age.ShouldNotBe(0); bar.Foo.ShouldNotBeNull(); bar.Foo.Name.ShouldNotBeNullOrWhiteSpace(); bar.Foo.Age.ShouldNotBe(0); }