public void InstantiateCreate_CosmosDbConnectionStringWithoutBase64Encoding_NBiException() { var factory = new SqlClientFactory(); var session = factory.Instantiate($"Endpoint=https://xyz.graphs.azure.com:443;AuthKey=@uthK3y;database=db;collection=FoF;api=sql"); Assert.Throws <Exception>(() => session.CreateNew()); }
public void InstantiateUnderlyingSession_CosmosDbConnectionString_ISession() { var factory = new SqlClientFactory(); var session = factory.Instantiate($"Endpoint=https://xyz.graphs.azure.com:443;AuthKey={base64AuthKey};database=db;collection=FoF;api=sql"); Assert.That(session.UnderlyingSessionType, Is.EqualTo(typeof(SqlClientOperation))); }
public void Instantiate_CosmosDbSql_SqlClient() { var factory = new SqlClientFactory(); var session = factory.Instantiate("Endpoint=https://xyz.graphs.azure.com:443;AuthKey=@uthk3y;database=db;collection=FoF;api=sql"); Assert.That(session, Is.Not.Null); Assert.That(session, Is.TypeOf <SqlClient>()); }
public void InstantiateCreate_CosmosDbConnectionString_ISession() { var factory = new SqlClientFactory(); var session = factory.Instantiate($"Endpoint=https://xyz.graphs.azure.com:443;AuthKey={base64AuthKey};database=db;collection=FoF;api=sql"); var underlyingSession = session.CreateNew(); Assert.That(underlyingSession, Is.Not.Null); Assert.That(underlyingSession, Is.AssignableTo <SqlClientOperation>()); }