Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoExceptionsWithJustStatisticsHandler Test Fails #9

Closed
abdullah2993 opened this issue Jul 9, 2016 · 2 comments
Closed

NoExceptionsWithJustStatisticsHandler Test Fails #9

abdullah2993 opened this issue Jul 9, 2016 · 2 comments

Comments

@abdullah2993
Copy link

abdullah2993 commented Jul 9, 2016

NoExceptionsWithJustStatisticsHandler test fails with exception

SharpPcap.DeviceNotReadyException
No delegates assigned to OnPacketArrival or OnPcapStatistics, no where for captured packets to go.

Reason

The test is to make sure no exception is thrown if OnPcapStatistics event is assigned but you forget to assign the handler so NoExceptionsWithJustStatisticsHandler and DeviceNotReadyExceptionWhenStartingACaptureWithoutAddingDelegateToOnPacketArrivalAndOnPcapStatistics are essentially the same.

Remedy

just add this line Here

devices[0].OnPcapStatistics += (sender, args) => { };

Note

I have configured AppVeyor with my Fork Here and fixed all the build, test and reference issues. You can check the build status here.
PS: If you want I can send a pull request with those fixes

@chmorgan
Copy link
Collaborator

chmorgan commented Jul 9, 2016

Good catch on that bug. I don't often test on windows so its good to have someone checking that. I'll get that pushed out to master in a minute.

Very cool on AppVeyor. Plan to open pull request to fix the other issues? Small pieces at a time if you could.

@chmorgan
Copy link
Collaborator

chmorgan commented Jul 9, 2016

Fix pushed up.

@chmorgan chmorgan closed this as completed Jul 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants