Ejemplo n.º 1
0
 public void Constructor_throws_when_null()
 {
     Assert.Throws <ArgumentNullException>(() =>
     {
         var exception = new UnusedStateMethodsException(null);
         exception.GetObjectData(null, new StreamingContext());
     });
 }
Ejemplo n.º 2
0
 public void GetObjectData_throws_when_null()
 {
     using (new StateProviderFixture())
     {
         Assert.Throws <ArgumentNullException>(() =>
         {
             var exception = new UnusedStateMethodsException(typeof(MissingStateForStateMethod).GetMethods());
             exception.GetObjectData(null, new StreamingContext());
         });
     }
 }