public void Validate_InvalidConfiguration_ExceptionThrown() { var endpoint = new MqttProducerEndpoint("topic") { Configuration = new MqttClientConfig() }; Action act = () => endpoint.Validate(); act.Should().ThrowExactly <EndpointConfigurationException>(); }
public void Validate_MissingTopic_ExceptionThrown() { var endpoint = new MqttProducerEndpoint(string.Empty) { Configuration = new MqttClientConfig { ChannelOptions = new MqttClientTcpOptions { Server = "test-server" } } }; Action act = () => endpoint.Validate(); act.Should().ThrowExactly <EndpointConfigurationException>(); }
public void Validate_ChunkingEnabledOnV500_ExceptionThrown() { var endpoint = new MqttProducerEndpoint("topic") { Configuration = new MqttClientConfig { ChannelOptions = new MqttClientTcpOptions { Server = "test-server" } }, Chunk = new ChunkSettings { Size = 10 } }; Action act = () => endpoint.Validate(); act.Should().ThrowExactly <EndpointConfigurationException>(); }