Пример #1
0
        public void Descripcion()
        {
            var composite = new CompositeCommand();
            composite.Add(new CreateFile("a", FILE1, "TEST"));
            composite.Add(new CopyFile("b", FILE1, FILE2));
            composite.Add(new DeleteFile("c", FILE1));

            var desc = composite.Description;

            Assert.AreEqual(desc, "a\r\nb\r\nc\r\n");
        }
Пример #2
0
        public void TestBasico()
        {
            var composite = new CompositeCommand();
            composite.Add(new CreateFile("Creando Archivo", FILE1, "TEST"));
            composite.Add(new CopyFile("Copiando", FILE1, FILE2));
            composite.Add(new DeleteFile("Borrando", FILE1));
            var button = new Button(composite);

            button.Click();

            Assert.IsTrue(File.Exists(FILE2));
        }