style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-7505528228218001"
data-ad-slot="1225241371">

Updated 40+ Misc Junit test cases

No replies
L3fty
Offline
Joined: 01/31/2011

As I was wanting to verify my setup against the JUnit test cases, I found the 40+ misc example (http://jnetpcap.com/examples/misc). However, when I tried to run it on my system, I found all kinds of deprecated and invalid syntax. I'm guessing this has something to do with updated code (I'm on 1.4), and possibly running Java 1.6.

Anyways, I went through and fixed most things so the JUnit test run mostly fine. The only thing I'm missing is the expected test-l2tp.pcap file, so my substitute file fails some of the assertions where it expects specific sizes. Is that file posted somewhere where I'm missing it?

I have attached the updated TestPcapJNI.java file (renamed to .txt so it can be uploaded...that's silly) for reference...I'm sure it's not perfect (I couldn't resolve HttpTrafficGenerator), but it's a first stab at updating.