Exemplo n.º 1
0
        public void WcGoodArgsTest()
        {
            var expected = "44 bytes\n4 lines\n6 words";
            var actual   = new WcCommand().Execute("../../../TestFiles/file.txt");

            Assert.AreEqual(expected, actual);
        }
        public CommandApplier()
        {
            simulator = new BashSimulator();
            commands  = new Dictionary <string, ICommand>();
            CatCommand catCommand = new CatCommand();

            commands[catCommand.Name] = catCommand;
            WcCommand wcCommand = new WcCommand();

            commands[wcCommand.Name] = wcCommand;
            PwdCommand pwdCommand = new PwdCommand();

            commands[pwdCommand.Name] = pwdCommand;
            AnotherCommand anotherCommand = new AnotherCommand();

            commands[anotherCommand.Name] = anotherCommand;
            EchoCommand echoCommand = new EchoCommand();

            commands[echoCommand.Name] = echoCommand;
        }