Example #1
0
 public void TestThrowsArgumentNullException()
 {
     Mock.Setup(() => TestStaticClass.TestVoidMethodWithoutParameters(), () =>
     {
         Assert.Throws <ArgumentNullException>(() => TestStaticClass.TestVoidMethodWithoutParameters());
     }).Throws <ArgumentNullException>();
 }
Example #2
0
 public void TestThrowsTestVoidMethodWithoutParameters()
 {
     Mock.Setup(() => TestStaticClass.TestVoidMethodWithoutParameters(), () =>
     {
         Assert.Throws <Exception>(() => TestStaticClass.TestVoidMethodWithoutParameters());
     }).Throws(typeof(Exception));
 }