Exemple #1
0
        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());
        }
Exemple #2
0
        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);
        }