Exemplo n.º 1
0
        public void View_Operations_Succeed_When_Initialize_Connection_Is_True()
        {
            var config = ConfigSectionUtils.GetConfigSection <CouchbaseClientSection>("httpclient-config-initconn");
            var client = new CouchbaseClient(config);
            var view   = client.GetView <City>("cities", "by_name", true).Stale(StaleMode.False);

            viewPass(view);
        }
Exemplo n.º 2
0
        public void Client_Operations_Succeed_When_Bootstrapping_To_Pools_Root_Uri()
        {
            var config = ConfigSectionUtils.GetConfigSection <CouchbaseClientSection>("pools-config");
            var client = new CouchbaseClient(config);

            string key = GetUniqueKey(), value = GetRandomString();
            var    storeResult = client.ExecuteStore(StoreMode.Add, key, value);

            StoreAssertPass(storeResult);
            var getResult = client.ExecuteGet(key);

            GetAssertPass(getResult, value);
        }
        public void Client_Operations_Succeed_When_Heartbeat_Is_Disabled()
        {
            var config = ConfigSectionUtils.GetConfigSection <CouchbaseClientSection>("heartbeat-config-off");

            using (var client = new CouchbaseClient(config))
            {
                string key = TestUtils.GetUniqueKey(), value = TestUtils.GetRandomString();
                var    storeResult = client.ExecuteStore(StoreMode.Add, key, value);
                TestUtils.StoreAssertPass(storeResult);

                var getResult = client.ExecuteGet(key);
                TestUtils.GetAssertPass(getResult, value);
            }
        }
        public void Client_Operations_Succeed_When_Heartbeat_Is_Not_Configured()
        {
            var config = ConfigSectionUtils.GetConfigSection <CouchbaseClientSection>("min-config");
            var client = new CouchbaseClient(config);

            string key = GetUniqueKey(), value = GetRandomString();
            var    storeResult = client.ExecuteStore(StoreMode.Add, key, value);

            StoreAssertPass(storeResult);

            var getResult = client.ExecuteGet(key);

            GetAssertPass(getResult, value);
        }
Exemplo n.º 5
0
        public void Client_Operations_Succeed_When_Bootstrapping_To_Pools_Default_Root_Uri()
        {
            var config = ConfigSectionUtils.GetConfigSection <CouchbaseClientSection>("pools-default-config");
            var client = new CouchbaseClient(config);

            string key = GetUniqueKey(), value = GetRandomString();
            var    storeResult = client.ExecuteStore(StoreMode.Add, key, value);

            Assert.That(storeResult.Success, Is.True, "Success was false");
            Assert.That(storeResult.Message, Is.Null.Or.Empty, "Message was not empty");

            var getResult = client.ExecuteGet(key);

            GetAssertPass(getResult, value);
        }