public void Encode_ValueIsNull_TreatItAsAnEmptyString() { var encoder = new PlainTextDeviceIdComponentEncoder(); var expected = encoder.Encode(new DeviceIdComponent("Name", string.Empty)); var actual = encoder.Encode(new DeviceIdComponent("Name", default(string))); actual.Should().Be(expected); }
public void Encode_ReturnsPlainTextComponentValue() { var encoder = new PlainTextDeviceIdComponentEncoder(); var component = new DeviceIdComponent("Name", "Value"); encoder.Encode(component).Should().Be("Value"); }