public void WindowsProperReturn() { bool isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); if (!isWindows) { Assert.Ignore("Skipping on a non-Windows operating system"); } List <string> winReturn = ReturnIp.WindowsReturn(ParseIp.WindowsParse(windowsOutput)); Regex testIp = new(@"\d+\.\d+\.\d+\.\d+"); foreach (var item in winReturn) { Assert.IsTrue(testIp.IsMatch(item)); } Assert.AreEqual(3, winReturn.Count); }
public void WindowsProperParse() { bool isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); if (!isWindows) { Assert.Ignore("Skipping on a non-Windows operating system"); } List <string> winParsed = ParseIp.WindowsParse(windowsOutput); string test1 = "\n"; string test2 = ""; foreach (var item in winParsed) { Assert.AreNotEqual(test1, item); Assert.AreNotEqual(test2, item); } Assert.AreEqual(winParsed.Count, 33); }