public void Optional(string expected) { var model = new DocumentOnTypeFormattingRegistrationOptions.StaticOptions { FirstTriggerCharacter = "." }; var result = Fixture.SerializeObject(model); result.Should().Be(expected); var deresult = new LspSerializer(ClientVersion.Lsp3).DeserializeObject <DocumentOnTypeFormattingRegistrationOptions.StaticOptions>(expected); deresult.Should().BeEquivalentTo(model, x => x.UsingStructuralRecordEquality()); }
public void SimpleTest(string expected) { var model = new DocumentOnTypeFormattingRegistrationOptions.StaticOptions { FirstTriggerCharacter = ".", MoreTriggerCharacter = ";`".Select(x => x.ToString()).ToArray(), }; var result = Fixture.SerializeObject(model); result.Should().Be(expected); var deresult = new LspSerializer(ClientVersion.Lsp3).DeserializeObject <DocumentOnTypeFormattingRegistrationOptions.StaticOptions>(expected); deresult.Should().BeEquivalentTo(model); }