Exemple #1
0
        public void InvalidCommandForNoArgs()
        {
            // Using defaults, the min number of args required is 3.
            // Arrange
            using (StringWriter sw = new StringWriter())
            {
                Console.SetOut(sw);
                string[] args        = new string[0];
                string   expectedMsg = "**Syntax Error - invalid command" + Environment.NewLine;

                // Act
                bool?expectedResult = sut.Validate(args);

                Assert.Multiple(() =>
                {
                    Assert.That(sw.ToString().Equals(expectedMsg));
                    Assert.That(expectedResult.Equals(false));
                });
            }
        }