public void SerialiseSimpleObject() { var simpleObject = new SimpleObject { Integer = 3, SomeString = "test" }; var model = simpleObject.ToKO(); model.ToJavascriptObject(ObjectName).Simplify().Should().BeInObject(ObjectName, "this.integer: ko.observable(3);this.someString: ko.observable('test');"); }
public void SerialiseSimpleObject() { var simpleObject = new SimpleObject { Integer = 3, SomeString = "test" }; var model = simpleObject.ToKO(); model.ToJavascript().Simplify().Should().Be("{integer: ko.observable(3), someString: ko.observable('test')}"); }