Beispiel #1
0
        public void TestErrorDir()
        {
            var cmd     = @"dir b:\";
            var command = new DosCommand(cmd);
            var res     = command.DoCommand();

            Assert.That(res.Status, Is.Not.EqualTo(0));
            Assert.That(res.Error, Is.Not.Empty);
            Assert.That(res.Output, Is.Empty);
        }
Beispiel #2
0
        public void TestDir()
        {
            var cmd     = @"dir c:\";
            var command = new DosCommand(cmd);
            var res     = command.DoCommand();

            Assert.That(res.Status, Is.EqualTo(0), res.Error);
            Assert.That(res.Error, Is.Empty);
            Assert.That(res.Output, Is.Not.Empty);
            Assert.That(res.Output, Contains.Substring(@"c:\"));
        }
Beispiel #3
0
 /// <summary>
 /// Adds a new command to the list of active commands.
 /// </summary>
 /// <param name="cmd">New command which should be available by now.</param>
 public void AddCommand(DosCommand cmd)
 {
     commands.Add(cmd);
 }