コード例 #1
0
        public void Test_CreateQuery_Overload2()
        {
            var expected = new Uri("http://localhost:8092/beer-sample/_design/dev_beer/_view/brewery_beers?");
            var bucket   = _cluster.OpenBucket("beer-sample");
            var query    = bucket.CreateQuery("beer", "brewery_beers", true).
                           RawUri();

            _cluster.CloseBucket(bucket);
            Assert.AreEqual(expected.Scheme, query.Scheme);
            Assert.AreEqual(expected.PathAndQuery, query.PathAndQuery);
        }
        public void When_UseSsl_True_CreateQuery_Returns_Https_Url()
        {
            var expected = new Uri("https://localhost:18092/beer-sample/_design/dev_beer/_view/brewery_beers?");
            var bucket   = _cluster.OpenBucket("beer-sample");

            var query = bucket.CreateQuery(true).
                        DesignDoc("beer").
                        View("brewery_beers").
                        RawUri();

            _cluster.CloseBucket(bucket);
            Assert.AreEqual(expected, query);
        }
コード例 #3
0
        public void When_UseSsl_True_CreateQuery_Returns_Https_Url()
        {
            var expected = new Uri("https://localhost:18092/beer-sample/_design/dev_beer/_view/brewery_beers?");
            var bucket   = _cluster.OpenBucket("beer-sample");

            var query = bucket.CreateQuery("beer", "brewery_beers").
                        Development(true).
                        RawUri();

            _cluster.CloseBucket(bucket);
            Assert.AreEqual(expected.Port, query.Port);
            Assert.AreEqual(expected.Scheme, query.Scheme);
            Assert.AreEqual(expected.PathAndQuery, query.PathAndQuery);
        }
コード例 #4
0
 public void TearDown()
 {
     _cluster.CloseBucket(_bucket);
 }