public void StreamNoApplicationId() { var stream = new StreamConfig(); stream.AddConfig("sasl.password", "coucou"); Assert.Throws <StreamConfigException>(() => stream.ToConsumerConfig()); }
public void StreamAddCorrectConfig() { var stream = new StreamConfig(); stream.ApplicationId = "unittest"; stream.AddConfig("sasl.password", "coucou"); var adminConfig = stream.ToAdminConfig("admin"); var consumerConfig = stream.ToConsumerConfig(); var producerConfig = stream.ToProducerConfig(); var globalConfig = stream.ToGlobalConsumerConfig("global"); Assert.AreEqual("coucou", adminConfig.SaslPassword); Assert.AreEqual("coucou", consumerConfig.SaslPassword); Assert.AreEqual("coucou", producerConfig.SaslPassword); Assert.AreEqual("coucou", globalConfig.SaslPassword); }