Commit 5d2a937d authored by Brickner_cp's avatar Brickner_cp

--no commit message

--no commit message
parent 90150a2e
...@@ -645,6 +645,7 @@ namespace PcapDotNet.Core.Test ...@@ -645,6 +645,7 @@ namespace PcapDotNet.Core.Test
PacketCommunicator communicator = device.Open(); PacketCommunicator communicator = device.Open();
try try
{ {
Assert.AreEqual(new PacketTotalStatistics(0, 0, 0, 0), communicator.TotalStatistics);
communicator.SetKernelBufferSize(2 * 1024 * 1024); // 2 MB instead of 1 communicator.SetKernelBufferSize(2 * 1024 * 1024); // 2 MB instead of 1
communicator.SetKernelMinimumBytesToCopy(10); // 10 bytes minimum to copy communicator.SetKernelMinimumBytesToCopy(10); // 10 bytes minimum to copy
communicator.SetSamplingMethod(new SamplingMethodNone()); communicator.SetSamplingMethod(new SamplingMethodNone());
...@@ -656,7 +657,6 @@ namespace PcapDotNet.Core.Test ...@@ -656,7 +657,6 @@ namespace PcapDotNet.Core.Test
Assert.AreEqual(PacketCommunicatorMode.Capture, communicator.Mode); Assert.AreEqual(PacketCommunicatorMode.Capture, communicator.Mode);
Assert.IsFalse(communicator.NonBlocking); Assert.IsFalse(communicator.NonBlocking);
Assert.AreEqual(PacketDevice.DefaultSnapshotLength, communicator.SnapshotLength); Assert.AreEqual(PacketDevice.DefaultSnapshotLength, communicator.SnapshotLength);
Assert.AreEqual(new PacketTotalStatistics(0, 0, 0, 0), communicator.TotalStatistics);
return communicator; return communicator;
} }
catch (Exception) catch (Exception)
......
...@@ -57,7 +57,7 @@ namespace PcapDotNet.Core.Test ...@@ -57,7 +57,7 @@ namespace PcapDotNet.Core.Test
#endregion #endregion
[TestMethod] [TestMethod]
public void ConstructorsTest() public void TestValidDataLinks()
{ {
PcapDataLink dataLink = new PcapDataLink(); PcapDataLink dataLink = new PcapDataLink();
Assert.AreEqual(new PcapDataLink("NULL"), dataLink); Assert.AreEqual(new PcapDataLink("NULL"), dataLink);
...@@ -76,8 +76,11 @@ namespace PcapDotNet.Core.Test ...@@ -76,8 +76,11 @@ namespace PcapDotNet.Core.Test
} }
Assert.AreEqual(new PcapDataLink(dataLinkName), dataLink); Assert.AreEqual(new PcapDataLink(dataLinkName), dataLink);
Assert.IsTrue(new PcapDataLink(dataLinkName) == dataLink);
Assert.IsFalse(new PcapDataLink(dataLinkName) != dataLink);
Assert.IsNotNull(dataLink.Description); Assert.IsNotNull(dataLink.Description);
Assert.AreEqual(i, dataLink.Value); Assert.AreEqual(i, dataLink.Value);
Assert.AreEqual(dataLink.Value.GetHashCode(), dataLink.GetHashCode());
} }
} }
......
...@@ -12,6 +12,7 @@ namespace PcapDotNet { namespace Core ...@@ -12,6 +12,7 @@ namespace PcapDotNet { namespace Core
static array<System::Byte>^ UnamangedToManagedByteArray(const unsigned char* unmanagedByteArray, int offset, int count); static array<System::Byte>^ UnamangedToManagedByteArray(const unsigned char* unmanagedByteArray, int offset, int count);
private: private:
[System::Diagnostics::DebuggerNonUserCode]
MarshalingServices(){} MarshalingServices(){}
}; };
}} }}
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "DeviceAddress.h" #include "DeviceAddress.h"
#include "BerkeleyPacketFilter.h" #include "BerkeleyPacketFilter.h"
#include "PacketDumpFile.h" #include "PacketDumpFile.h"
#include "PacketDeviceOpenFlags.h" #include "PacketDeviceOpenAttributes.h"
#include "PacketSampleStatistics.h" #include "PacketSampleStatistics.h"
#include "PacketTotalStatistics.h" #include "PacketTotalStatistics.h"
#include "PcapDataLink.h" #include "PcapDataLink.h"
......
...@@ -10,6 +10,7 @@ namespace PcapDotNet { namespace Core ...@@ -10,6 +10,7 @@ namespace PcapDotNet { namespace Core
static void GetPcapHeader(pcap_pkthdr &header, Packets::Packet^ packet); static void GetPcapHeader(pcap_pkthdr &header, Packets::Packet^ packet);
private: private:
[System::Diagnostics::DebuggerNonUserCode]
PacketHeader(){} PacketHeader(){}
}; };
}} }}
\ No newline at end of file
...@@ -11,6 +11,7 @@ namespace PcapDotNet { namespace Core ...@@ -11,6 +11,7 @@ namespace PcapDotNet { namespace Core
} }
private: private:
[System::Diagnostics::DebuggerNonUserCode]
PcapLibrary(){} PcapLibrary(){}
}; };
}} }}
\ No newline at end of file
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
> >
</File> </File>
<File <File
RelativePath=".\PacketDeviceOpenFlags.h" RelativePath=".\PacketDeviceOpenAttributes.h"
> >
</File> </File>
<File <File
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment