Im starting a process and redirecting it error stream to be able to parse it and know what happened. I
m doing it in such a way:
_proc.ErrorDataReceived += new DataReceivedEventHandler(NetErrorDataHandler);
where NetErrorDataHandler have the following signature:
private void NetErrorDataHandler(object sendingProcess, DataReceivedEventArgs errLine)
So far i have to work with DataReceivedEventArgs. But how to test it, except for running the process Im working with? You can
t create instance of DataReceivedEventArgs with data you like. so how to overcome it? The only way I see now is create a process that would do the work for me. But it`s not the best way for testing.