コード例 #1
0
        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());
        }
コード例 #2
0
        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)));
        }
コード例 #3
0
        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>());
        }
コード例 #4
0
        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>());
        }