Exemple #1
0
        public void TestContructor2()
        {
            AdsOAuthException exception = new AdsOAuthException(message, innerException);

            Assert.AreEqual(message, exception.Message);
            Assert.AreEqual(innerException, exception.InnerException);
        }
Exemple #2
0
        public void TestContructor3()
        {
            AdsOAuthException exception = new AdsOAuthException();

            Assert.AreEqual("Exception of type 'Google.Api.Ads.Common.Lib." +
                            "AdsOAuthException' was thrown.", exception.Message);
            Assert.Null(exception.InnerException);
        }
Exemple #3
0
 public void TestContructor4()
 {
     Assert.DoesNotThrow(delegate() {
         AdsOAuthException exception = new AdsOAuthException();
         BinaryFormatter formatter   = new BinaryFormatter();
         MemoryStream memStream      = new MemoryStream();
         formatter.Serialize(memStream, exception);
         memStream.Seek(0, SeekOrigin.Begin);
         formatter.Deserialize(memStream);
         memStream.Dispose();
     });
 }