public void ConnectionTypeLocatorFromInfoThrowsOnUnknown()
        {
            var manager   = new ConnectionStringManager(new ConfigurationBuilder().Build());
            var exception = Assert.Throws <ConnectorException>(() => manager.GetFromServiceInfo(new DB2ServiceInfo("id", "http://idk")));

            Assert.Contains("DB2ServiceInfo", exception.Message);
        }
        public void ConnectionTypeLocatorFindsTypeFromServiceInfo()
        {
            var cosmosInfo   = new CosmosDbServiceInfo("id");
            var mongoInfo    = new MongoDbServiceInfo("id", "mongodb://host");
            var mysqlInfo    = new MySqlServiceInfo("id", "mysql://host");
            var oracleInfo   = new OracleServiceInfo("id", "oracle://host");
            var postgresInfo = new PostgresServiceInfo("id", "postgres://host");
            var rabbitMqInfo = new RabbitMQServiceInfo("id", "rabbitmq://host");
            var redisInfo    = new RedisServiceInfo("id", "redis://host");
            var sqlInfo      = new SqlServerServiceInfo("id", "sqlserver://host");
            var manager      = new ConnectionStringManager(new ConfigurationBuilder().Build());

            Assert.StartsWith("CosmosDb", manager.GetFromServiceInfo(cosmosInfo).Name);
            Assert.StartsWith("MongoDb", manager.GetFromServiceInfo(mongoInfo).Name);
            Assert.StartsWith("MySql", manager.GetFromServiceInfo(mysqlInfo).Name);
            Assert.StartsWith("Oracle", manager.GetFromServiceInfo(oracleInfo).Name);
            Assert.StartsWith("Postgres", manager.GetFromServiceInfo(postgresInfo).Name);
            Assert.StartsWith("RabbitMQ", manager.GetFromServiceInfo(rabbitMqInfo).Name);
            Assert.StartsWith("Redis", manager.GetFromServiceInfo(redisInfo).Name);
            Assert.StartsWith("SqlServer", manager.GetFromServiceInfo(sqlInfo).Name);
        }