Exemplo n.º 1
0
        public void TestMethod_ParserCommand_keyval()
        {
            // Arrange
            var command = new ParserCommand();
            command.Params = "-k key1 val1";

            // Act
            var result = command.DoAction();

            // Assert
            Assert.AreEqual("key1-val1", result);
        }
Exemplo n.º 2
0
        public void TestMethod_ParserCommand_TwoKeyvalWithNull()
        {
            // Arrange
            var command = new ParserCommand();
            command.Params = "-k key1 val1 key2";

            // Act
            var result = command.DoAction();

            // Assert
            Assert.AreEqual("key1-val1" + System.Environment.NewLine + "key2-<null>", result);
        }
Exemplo n.º 3
0
        public void TestMethod_ParserCommand_Check()
        {
            // Arrange
            var command = new ParserCommand();
            command.Params = "-k djdjdjk";

            // Act
            var result = command.IsMatch();

            // Assert
            Assert.AreEqual(true, result);
        }