public void BinarySerialization()
        {
            string message = "Error message";
            DropboxApiError error = DropboxApiError.OperationNotPermitted;

            DropboxApiException exBefore = new DropboxApiException(message, error);

            DropboxApiException exAfter = SerializationTestUtils.BinarySerializeAndDeserialize(exBefore) as DropboxApiException;

            Assert.IsNotNull(exAfter);
            Assert.AreEqual(message, exAfter.Message, "Invalid message");
            Assert.AreEqual(error, exAfter.Error, "Invalid error");
        }
        public void BinarySerialization()
        {
            string          message = "Error message";
            DropboxApiError error   = DropboxApiError.OperationNotPermitted;

            DropboxApiException exBefore = new DropboxApiException(message, error);

            DropboxApiException exAfter = SerializationTestUtils.BinarySerializeAndDeserialize(exBefore) as DropboxApiException;

            Assert.IsNotNull(exAfter);
            Assert.AreEqual(message, exAfter.Message, "Invalid message");
            Assert.AreEqual(error, exAfter.Error, "Invalid error");
        }