I have a method that looks something like this
public override void GetObjectData(SerializationInfo info, StreamingContext context)
If I'm unit testing this method, should I just leave it as it is or should I try and test 'base.GetObjectData()' by iteself by refactoring it out somehow?
How would I unit test this method?
I included a statement that now checks to see if a parameter in null.
if (info == null)
throw new ArgumentNullException("info");
and I included a test like so
public void GetObjectData_NullParameters_ThrowsException()
Respondent myRespondent = new Respondent(new RespondentInformation());
SerializationInfo info = null;
StreamingContext context = new StreamingContext();
but isn't there more to test? What else can I test? Shouldn't I be testing the base.GetObjectData' method?