public void Test1() { Assert.Throws <ArgumentNullException>(() => { TestObject1 o = (TestObject1)TypeAccessor.CreateInstance(typeof(TestObject1)); o.Foo1("str1", null, "str3"); }); }
[Test, ExpectedException(typeof(ArgumentNullException))] // Error message is localized by framework. public void Test1() { TestObject1 o = (TestObject1)TypeAccessor.CreateInstance(typeof(TestObject1)); o.Foo1("str1", null, "str3"); }