public void InitializeFromFullCmdLine_AssignmentDelimiterColonOneArgument_InitializedFromArgs() { // Arrange var cmdLineObj = new ColonAssignmentDelimiterCmdLineObject(); // Act cmdLineObj.InitializeFromCmdLine(new[] { "/Name:John" }); //Assert Assert.That(cmdLineObj.Name, Is.EqualTo("John")); }
InitializeFromFullCmdLine_AssignmentDelimiterColonArrayArgumentsValueContainsDoubleQuotes_InitializedFromArgs () { // Arrange var cmdLineObj = new ColonAssignmentDelimiterCmdLineObject(); // Act cmdLineObj.InitializeFromCmdLine(new[] { @"/Name:""John Smith""" }); //Assert Assert.That(cmdLineObj.Name, Is.EqualTo("John Smith")); }
public void GetHelpText_ColonAssignmentDelimiterCmdLineObject_UsageContainsSpace() { // Arrange var cmdLineObj = new ColonAssignmentDelimiterCmdLineObject(); // Act cmdLineObj.InitializeFromCmdLine(new[] { "/Name", "John" }); //Assert string helpText = cmdLineObj.GetHelpText(80); Assert.That(helpText, Is.EqualTo(@"Command-line options. [/Name:<Name>] [/?[-]] /Name The name of the user /Count Count Default Value: 0 /? Displays command-line usage information. Default Value: False ")); }