NullMetaListConverterTests¶
Namespace: UnitTests.MqttReceiver
Unit tests for the NullMetaListConverter class, verifying JSON conversion logic for TempSensorReading lists.
Inheritance Object → NullMetaListConverterTests
Constructors¶
NullMetaListConverterTests()¶
Methods¶
Read_ArrayWithMixedNullAndValidObjects_ReturnsArray()¶
Tests that an array with mixed null and valid objects is preserved.
Read_ArrayWithOnlyNulls_ReturnsNull()¶
Tests that an array containing only null values is correctly converted to null.
Read_ArrayWithSingleValidObject_ReturnsArray()¶
Tests that a single valid object in an array is preserved.
Read_ArrayWithValidObjects_ReturnsArray()¶
Tests that an array with valid TempSensorReading objects is preserved.
Read_EmptyArray_ReturnsNull()¶
Tests that an empty JSON array is correctly converted to null.
Read_NullJson_ReturnsNull()¶
Tests that a null JSON value is correctly converted to null.
Setup()¶
Sets up test fixtures and initializes the converter with JSON options.
Write_EmptyList_SerializesAsEmptyArray()¶
Tests that an empty list is correctly serialized as an empty array.
Write_ListWithNullObjects_SerializesCorrectly()¶
Tests that a list with null objects is correctly serialized.
Write_ListWithValidObjects_SerializesCorrectly()¶
Tests that a list with valid objects is correctly serialized.
Write_NullList_SerializesAsNull()¶
Tests that a null list is correctly serialized as null.