Exemplo n.º 1
0
        public void TestContructor3()
        {
            AdsException exception = new MockAdsException(message, innerException);

            Assert.AreEqual(message, exception.Message);
            Assert.AreEqual(innerException, exception.InnerException);
        }
Exemplo n.º 2
0
 public void TestContructor4()
 {
     Assert.DoesNotThrow(delegate() {
         MockAdsException exception = new MockAdsException();
         exception.MockProperty     = 2;
         BinaryFormatter formatter  = new BinaryFormatter();
         MemoryStream memStream     = new MemoryStream();
         formatter.Serialize(memStream, exception);
         memStream.Seek(0, SeekOrigin.Begin);
         MockAdsException exception1 = (MockAdsException)formatter.Deserialize(memStream);
         memStream.Dispose();
         Assert.AreEqual(2, exception1.MockProperty);
     });
 }
Exemplo n.º 3
0
 public void TestContructor1()
 {
     Assert.DoesNotThrow(delegate() {
         AdsException exception = new MockAdsException();
     });
 }