public void CreateAll_HasConfig_ReturnAdapters() { var configuration = new ConfigurationBuilder().AddJsonFile("appsettingsAll.json", true) .Build(); var constructor = new MqSeriesQueueMessageAdapterConstructor(configuration); var adapters = constructor.CreateAll(false); 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("NextValue")); }); }
public void CreateAll_HasNoClientIdQueueInConfig_Exception() { Assert.Throws <ArgumentNullException>(() => _constructor.CreateAll(), "Value cannot be null. (Parameter 'ClientId')"); }