Esempio n. 1
0
        public void TestExceptionEnumerable()
        {
            var innerException     = new SocketException();
            var nextException      = new HttpRequestException("Socket exception", innerException);
            var otherNextException = new CouchbaseLiteException();
            var aggregate          = new AggregateException("OMG", nextException, otherNextException);

            string statusCode;

            Assert.IsTrue(Misc.IsTransientNetworkError(aggregate, out statusCode));
            CollectionAssert.AreEqual(new Exception[] { innerException, nextException, otherNextException },
                                      new ExceptionEnumerable(aggregate).ToArray());
        }