Exemplo n.º 1
0
        private void UsingServer(Action <CouchDBServer> body)
        {
            var server = new CouchDBServer(_serverUrl);

            try
            {
                body(server);
            }
            catch (CouchDBClientException ex)
            {
                Console.WriteLine("Error: {0}, Response object: {1}.", ex.Message, SerializationHelper.Serialize(ex.ServerResponse));
            }
            catch (AggregateException ae) when(ae.InnerException is CouchDBClientException)
            {
                var ex = ae.InnerException as CouchDBClientException;

                Console.WriteLine("Error: {0}, Response object: {1}.", ex.Message, SerializationHelper.Serialize(ex.ServerResponse));
            }
        }
Exemplo n.º 2
0
 public CouchDBServerTests()
 {
     _sut = new CouchDBServer(_handler.Object);
 }