public void CreateAll_HasConfig_ReturnAdapters() { var configuration = new ConfigurationBuilder().AddJsonFile("appsettingsAll.json", true) .Build(); var constructor = new KafkaQueueMessageAdapterConstructor(configuration, Given.FakeLoggerFactory); var adapters = constructor.CreateAll(); Assert.Multiple(() => { Assert.That(adapters, Is.Not.Null); Assert.That(adapters.Count, Is.EqualTo(2)); Assert.That(adapters.First().Configuration, Is.Not.Null); Assert.That(adapters.First().Configuration.Id, Is.EqualTo(QueueId)); Assert.That(adapters.Last().Configuration, Is.Not.Null); Assert.That(adapters.Last().Configuration.Id, Is.EqualTo("nextKafkaQueue")); }); }
public void CreateAll_HasNoServerQueueInConfig_Exception() { Assert.Throws <ArgumentNullException>(() => _constructor.CreateAll(), "Value cannot be null. (Parameter 'Server')"); }