TempSensorReadingTests¶
Namespace: UnitTests.MqttReceiver
Unit tests for the TempSensorReading model, verifying JSON serialization and property behavior.
Inheritance Object → TempSensorReadingTests
Constructors¶
TempSensorReadingTests()¶
Methods¶
DefaultValues_AreCorrect()¶
Tests that default property values are as expected.
Deserialize_CompleteJson_ProducesCorrectObject()¶
Tests that a complete JSON string deserializes correctly to TempSensorReading.
Deserialize_MinimalJson_ProducesCorrectObject()¶
Tests that a minimal JSON string deserializes correctly to TempSensorReading.
Deserialize_NullMetaList_ConvertedToNull()¶
Tests that null meta list is handled by the NullMetaListConverter.
Deserialize_NullValuesInArray_HandlesCorrectly()¶
Tests that null values in the value array are handled correctly.
Deserialize_TimestampAsNumber_ParsesCorrectly()¶
Tests that timestamp can be read from number format.
Deserialize_TimestampAsString_ParsesCorrectly()¶
Tests that timestamp can be read from string format (JsonNumberHandling.AllowReadingFromString).
Properties_SetAndGet_WorkCorrectly()¶
Tests that all properties can be set and retrieved correctly.
Serialize_CompleteTempSensorReading_ProducesCorrectJson()¶
Tests that a complete TempSensorReading object serializes correctly to JSON.
Serialize_MinimalTempSensorReading_ProducesCorrectJson()¶
Tests that a minimal TempSensorReading object serializes correctly to JSON.
Setup()¶
Sets up test fixtures and initializes JSON serialization options.