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);
        }
        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);
 }