File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 11using System . Runtime . Serialization ;
2+ using Newtonsoft . Json ;
3+ using Newtonsoft . Json . Converters ;
24
35namespace OmniSharp . Extensions . LanguageServer . Protocol . Models
46{
57 /// <summary>
68 /// Enum of known range kinds
79 /// </summary>
10+ [ JsonConverter ( typeof ( StringEnumConverter ) ) ]
811 public enum FoldingRangeKind
912 {
1013 /// <summary>
Original file line number Diff line number Diff line change 1+ using FluentAssertions ;
2+ using OmniSharp . Extensions . LanguageServer . Protocol . Models ;
3+ using OmniSharp . Extensions . LanguageServer . Protocol . Serialization ;
4+ using Xunit ;
5+
6+ namespace Lsp . Tests
7+ {
8+ public class FoldingRangeKindTests
9+ {
10+ [ Fact ]
11+ public void CommentTest ( )
12+ {
13+ var serializer = new Serializer ( ) ;
14+ var json = serializer . SerializeObject ( FoldingRangeKind . Comment ) ;
15+ json . Should ( ) . Be ( "\" comment\" " ) ;
16+ }
17+
18+ [ Fact ]
19+ public void ImportsTest ( )
20+ {
21+ var serializer = new Serializer ( ) ;
22+ var json = serializer . SerializeObject ( FoldingRangeKind . Imports ) ;
23+ json . Should ( ) . Be ( "\" imports\" " ) ;
24+ }
25+
26+ [ Fact ]
27+ public void RegionTest ( )
28+ {
29+ var serializer = new Serializer ( ) ;
30+ var json = serializer . SerializeObject ( FoldingRangeKind . Region ) ;
31+ json . Should ( ) . Be ( "\" region\" " ) ;
32+ }
33+ }
34+ }
You can’t perform that action at this time.
0 commit comments