Ejemplo n.º 1
0
        public void IsPortInUse_With135_ReturnsTrue()
        {
            /* This is a really crappy test and only works on Windows environments -- my apologies. */

            if (Environment.OSVersion.Platform == PlatformID.Win32NT)
            {
                Assert.True(PortAvailability.IsPortBeingUsed(135));
            }
            else
            {
                Assert.True(true);
            }
        }
Ejemplo n.º 2
0
 public void IsPortInUse_OutsideOfRange_ReturnsTrue()
 {
     Assert.True(PortAvailability.IsPortBeingUsed(IPEndPoint.MinPort - 1));
     Assert.True(PortAvailability.IsPortBeingUsed(IPEndPoint.MaxPort + 1));
 }