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