public void CanSetCustomPropertiesAndGenericProperties() { string document = CustomObject .Create() .WithId(SetTo.Value("ID123")) .With("description", SetTo.Value("This is a description")) .WithName(SetTo.Value("Test")) .With("Age", SetTo.Value(42)) .WithCat(SetTo.Null); Assert.Equal( @"{""id"":""ID123"",""description"":""This is a description"",""name"":""Test"",""Age"":42,""cat"":null}", document); }
public void CanCreateCustomObject() { string document = CustomObject.Create(); Assert.Equal("{}", document); }