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