File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
src/MongoDB.Driver/Core/Connections
tests/MongoDB.Driver.Tests/Core/Connections Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ public long LongLocalValue
106
106
[ Obsolete ( "Use LongServerValue instead." ) ]
107
107
public int ? ServerValue
108
108
{
109
- get { return ( int ) _serverValue ; }
109
+ get { return ( int ? ) _serverValue ; }
110
110
}
111
111
112
112
/// <summary>
Original file line number Diff line number Diff line change @@ -92,6 +92,16 @@ public void LongLocalValue_should_be_what_was_specified_in_the_constructor(long
92
92
subject . LongLocalValue . Should ( ) . Be ( localValue ) ;
93
93
}
94
94
95
+ [ Fact ]
96
+ public void ServerValue_should_return_null_when_null ( )
97
+ {
98
+ var subject = new ConnectionId ( __serverId , 10 ) ;
99
+
100
+ #pragma warning disable CS0618 // Type or member is obsolete
101
+ subject . ServerValue . ShouldBeEquivalentTo ( null ) ;
102
+ #pragma warning restore CS0618 // Type or member is obsolete
103
+ }
104
+
95
105
[ Theory ]
96
106
[ InlineData ( 0 ) ]
97
107
[ InlineData ( int . MaxValue ) ]
You can’t perform that action at this time.
0 commit comments