public void CheckQueueNamesAreUniqueShouldSucceed() { var newInstance = new ServiceControlNewInstance { TransportPackage = "MSMQ", AuditLogQueue = "auditlog", ErrorLogQueue = "errorlog", AuditQueue = "audit", ErrorQueue = "error" }; var p = new ServiceControlQueueNameValidator(newInstance) { Instances = new List <IServiceControlTransportConfig>() }; Assert.DoesNotThrow(() => p.CheckQueueNamesAreUniqueWithinInstance()); }
public void CheckQueueNamesAreUniqueShouldThrow() { var newInstance = new ServiceControlNewInstance { TransportPackage = "MSMQ", AuditLogQueue = "audit", ErrorLogQueue = "error", AuditQueue = "audit", ErrorQueue = "error" }; var p = new ServiceControlQueueNameValidator(newInstance) { Instances = new List <IServiceControlTransportConfig>() }; var ex = Assert.Throws <EngineValidationException>(() => p.CheckQueueNamesAreUniqueWithinInstance()); Assert.That(ex.Message, Is.StringContaining("Each of the queue names specified for a instance should be unique")); }