Example #1
0
        public async Task SetUp()
        {
            _doc = new TestDoc(
                "lol",
                "rotflmao"
                );

            _client = new Client(
                "http://localhost:5984",
                new BasicCredProvider(
                    "admin",
                    "password"
                    )
                );

            await _client.LogIn();

            await _client.CreateDb("test_couchy");

            _db = new Db(
                "test_couchy",
                _client,
                new TestDocFactory()
                );
        }
Example #2
0
        public async Task TestDocUpdate()
        {
            var newDoc = new TestDoc(
                "lol",
                "lulz"
                );

            var response = await _db.Update(newDoc);

            Assert.That(HttpHandler.IsSuccessStatusCode(response));
            var readResponse = await _db.Read <TestDoc>("lol");

            Assert.That(((TestDoc)readResponse).Content == "lulz");
        }