public void excludes_the_ignored_properties() { var target = new ComplexTarget { Name = "test", Nested = new NestedTarget { Email = "*****@*****.**" } }; var writer = ObjectBlockWriter.Basic(x => x.RegisterSettings <ComplexTargetSettings>()); var block = writer.BlockFor(target); block.FindProperty("name").Value.ShouldEqual("test"); block.FindNested("nested").ShouldBeNull(); }
public void sets_the_properties() { var target = new ComplexTarget { Name = "test", Nested = new NestedTarget { Email = "*****@*****.**" } }; var writer = ObjectBlockWriter.Basic(); var block = writer.BlockFor(target); block.FindProperty("name").Value.ShouldEqual("test"); var nested = block.FindNested("nested"); nested.FindProperty("email").Value.ShouldEqual("*****@*****.**"); }