Commit 88526433 authored by Brickner_cp's avatar Brickner_cp

--no commit message

--no commit message
parent 1c8275b9
......@@ -43,7 +43,13 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UnitTest1.cs" />
<Compile Include="PcapLibTests.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PcapDotNet.Core\WinPCapDotNet.Core.vcproj">
<Project>{89C63BE1-AF9A-472E-B256-A4F56B1655A7}</Project>
<Name>PcapDotNet.Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
......
......@@ -2,6 +2,7 @@
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace PcapDotNet.Core.Test
......@@ -10,9 +11,9 @@ namespace PcapDotNet.Core.Test
/// Summary description for UnitTest1
/// </summary>
[TestClass]
public class UnitTest1
public class PcapLibTests
{
public UnitTest1()
public PcapLibTests()
{
//
// TODO: Add constructor logic here
......@@ -60,11 +61,12 @@ namespace PcapDotNet.Core.Test
#endregion
[TestMethod]
public void TestMethod1()
public void VersionTest()
{
//
// TODO: Add test logic here
//
const string VersionNumberRegex = @"[0-9]+\.[0-9]+\.[0-9]+(?:\.[0-9]+)?";
const string VersionRegex = "^WinPcap version " + VersionNumberRegex + @" \(packet\.dll version " + VersionNumberRegex + @"\), based on libpcap version " + VersionNumberRegex + "$";
string version = PcapLibrary.Version;
Assert.IsTrue(Regex.IsMatch(version, VersionRegex), "Version " + version + " doesn't match regex " + VersionRegex);
}
}
}
......@@ -4,7 +4,7 @@
namespace PcapDotNet { namespace Core
{
public ref class MarshalingServices
private ref class MarshalingServices
{
public:
static std::string ManagedToUnmanagedString(System::String^ managedString);
......
......@@ -4,6 +4,7 @@ namespace PcapDotNet { namespace Core
{
public ref class PcapLibrary
{
public:
static property System::String^ Version
{
System::String^ get();
......
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