File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
QuixStreams.Telemetry.UnitTests/Models/Telemetry Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -328,7 +328,9 @@ public void Clear()
328
328
/// <returns>Returns the value</returns>
329
329
public T Value
330
330
{
331
- get => genericConverter ( this . inMemoryValue ) ;
331
+ get => this . inMemoryValue == null
332
+ ? default
333
+ : genericConverter ( this . inMemoryValue ) ;
332
334
set => this . inMemoryValue = stateValueConverter ( value ) ;
333
335
}
334
336
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public void Register_CompactJsonForBetterPerformance_ShouldRegisterAsExpected()
42
42
var codecs = Transport . Registry . CodecRegistry . RetrieveCodecs ( new ModelKey ( "TimeseriesData" ) ) ;
43
43
codecs . Count ( ) . Should ( ) . Be ( 3 ) ;
44
44
codecs . Should ( ) . Contain ( x => x is TimeseriesDataReadableCodec ) ; // for reading
45
- codecs . Should ( ) . Contain ( x => x is TimeseriesDataJsonCodec ) ; // for reading
45
+ codecs . Should ( ) . Contain ( x => x is DefaultJsonCodec < TimeseriesDataRaw > ) ; // for reading
46
46
codecs . Should ( ) . Contain ( x => x is TimeseriesDataProtobufCodec ) ; // for reading
47
47
codecs . First ( ) . GetType ( ) . Should ( ) . Be ( typeof ( TimeseriesDataReadableCodec ) ) ; // for writing
48
48
}
@@ -57,9 +57,9 @@ public void Register_JsonTimeseriesData_ShouldRegisterAsExpected()
57
57
var codecs = Transport . Registry . CodecRegistry . RetrieveCodecs ( new ModelKey ( "TimeseriesData" ) ) ;
58
58
codecs . Count ( ) . Should ( ) . Be ( 3 ) ;
59
59
codecs . Should ( ) . Contain ( x => x is TimeseriesDataReadableCodec ) ; // for reading
60
- codecs . Should ( ) . Contain ( x => x is TimeseriesDataJsonCodec ) ; // for reading
60
+ codecs . Should ( ) . Contain ( x => x is DefaultJsonCodec < TimeseriesDataRaw > ) ; // for reading
61
61
codecs . Should ( ) . Contain ( x => x is TimeseriesDataProtobufCodec ) ; // for reading
62
- codecs . First ( ) . GetType ( ) . Should ( ) . Be ( typeof ( TimeseriesDataJsonCodec ) ) ; // for writing
62
+ codecs . First ( ) . GetType ( ) . Should ( ) . Be ( typeof ( DefaultJsonCodec < TimeseriesDataRaw > ) ) ; // for writing
63
63
}
64
64
65
65
[ Fact ]
You can’t perform that action at this time.
0 commit comments