コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }