public void EntityNameValidationTest(string entityName, bool isPathSeparatorAllowed) { Assert.Throws <ArgumentException>( () => { if (isPathSeparatorAllowed) { EntityNameHelper.CheckValidQueueName(entityName); } else { EntityNameHelper.CheckValidSubscriptionName(entityName); } }); }