예제 #1
0
        public void InitializeFromFullCmdLine_AssignmentDelimiterColonOneArgument_InitializedFromArgs()
        {
            // Arrange
            var cmdLineObj = new ColonAssignmentDelimiterCmdLineObject();

            // Act
            cmdLineObj.InitializeFromCmdLine(new[] { "/Name:John" });

            //Assert
            Assert.That(cmdLineObj.Name, Is.EqualTo("John"));
        }
예제 #2
0
        InitializeFromFullCmdLine_AssignmentDelimiterColonArrayArgumentsValueContainsDoubleQuotes_InitializedFromArgs
            ()
        {
            // Arrange
            var cmdLineObj = new ColonAssignmentDelimiterCmdLineObject();

            // Act
            cmdLineObj.InitializeFromCmdLine(new[] { @"/Name:""John Smith""" });

            //Assert
            Assert.That(cmdLineObj.Name, Is.EqualTo("John Smith"));
        }
예제 #3
0
        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
"));
        }