public void GetHelp_NoParam() { var sw1 = new CommandSwitch("switch", 's'); sw1.AddAlternativeNames("alt"); sw1.SetHelp("Help here"); StringBuilder sb = new StringBuilder(); sw1.GetHelp(new Setup(), sb); var actual = sb.ToString(); var expected = " -s --switch, --alt Help here\n"; Assert.AreEqual(expected, actual); }
public void GetHelp_WithAltNamesNoLongname_CorrectDisplay() { var sw1 = new CommandSwitch("s"); sw1.AddAlternativeNames("alternative"); sw1.SetHelp("Help here"); StringBuilder sb = new StringBuilder(); sw1.GetHelp(new Setup(), sb); var actual = sb.ToString(); var expected = " -s --alternative Help here\n"; Assert.AreEqual(expected, actual); }