public void TestSerializingExceptions() { using(var client = new Amazon.S3.AmazonS3Client()) { try { var fakeBucketName = "super.duper.fake.bucket.name.123." + Guid.NewGuid().ToString(); client.ListObjects(fakeBucketName); } catch(AmazonS3Exception e) { TestException(e); } var s3pue = CreateS3PostUploadException(); TestException(s3pue); var doe = CreateDeleteObjectsException(); TestException(doe); var aace = new AdfsAuthenticationControllerException("Message"); TestException(aace); #pragma warning disable 618 var ccre = new CredentialCallbackRequiredException("Message"); TestException(ccre); var afe = new AuthenticationFailedException("Message"); TestException(afe); #pragma warning restore 618 } }