private void CheckInitIncludeProperties(INbJsonSerialize nbJsonSerialize) { var includeProperties = _dynamicHashModel.GetIncludeProperties(); includeProperties.Log(); includeProperties.Count.ShouldEqual(2); _dynamicHashModel.Set("Bar", () => "BAR"); var dynamicHashModel = _dynamicHashModel.AsDynamic(); dynamicHashModel.Foo = "FOO"; dynamicHashModel.Blah = (Func <string>)(() => { var message = "Should Not Invoke Here"; message.Log(); return(message); }); var httpGetJson = (string)nbJsonSerialize.Serialize(dynamicHashModel); httpGetJson.Log(); ((object)dynamicHashModel.Foo).ShouldEqual("FOO"); ((object)dynamicHashModel.Bar).ShouldEqual("BAR"); ((object)dynamicHashModel.Blah).ShouldNull("Blah"); }