public void BasicTest() { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return; } var cli = new CliRunner("hostname"); var sb = new StringBuilder(); using (var sw = new StringWriter(sb)) { cli.Redirect(sw); } var hostname = sb.ToString().Trim(); Assert.NotNull(hostname); Assert.True(hostname.Length > 0); }