public void AddActionTest() { Coordinator coord=new Coordinator(); repository.ReplayAll(); coord.AddAction(act); repository.VerifyAll(); Assert.AreEqual(1,coord.runningActions.Count); }
public void AddActionTest() { Coordinator coord = new Coordinator(); repository.ReplayAll(); coord.AddAction(act); repository.VerifyAll(); Assert.AreEqual(1, coord.runningActions.Count); }
public void RunTest() { Coordinator coord = new Coordinator(); act.Run(); repository.ReplayAll(); coord.AddAction(act); coord.Run(); repository.VerifyAll(); //Assert.AreEqual(false, coord.Canceled); }
public void GetActionsTest() { Coordinator coord = new Coordinator(); Expect.Call(act.Name()).Return("Тест"); repository.ReplayAll(); coord.AddAction(act); string[] str = coord.GetActions(); repository.VerifyAll(); Assert.AreEqual("Тест", str[0]); }
private void создатьСкриптНаБазуToolStripMenuItem_Click(object sender, EventArgs e) { // make script if (dlg_SaveScript.ShowDialog() == System.Windows.Forms.DialogResult.OK) { StreamWriter writer = new StreamWriter(dlg_SaveScript.FileName); Coordinator coordinator = new Coordinator(); // add actions coordinator.AddAction(new ActionWriteDropScript(writer, PDATable.tables)); coordinator.AddAction(new ActionWriteCreateTableScript(writer, PDATable.tables)); coordinator.AddAction(new ActionWriteInsertScript(writer, PDATable.tables)); // // example:coordinator.AddAction(new ActionPrepExportScripts()); // make dialog dlgRunning dlg = new dlgRunning(); dlg.Text = "Экспорт структуры"; dlg.coordinator = coordinator; dlg.ShowDialog(); writer.Close(); } }
private void выполнитьСкриптToolStripMenuItem_Click(object sender, EventArgs e) { // run script if (dlg_OpenScript.ShowDialog() == System.Windows.Forms.DialogResult.OK) { Coordinator coordinator = new Coordinator(); // add actions coordinator.AddAction(new ActionRunScriptFromStream(dlg_OpenScript.FileName)); // // example:coordinator.AddAction(new ActionPrepExportScripts()); // make dialog dlgRunning dlg = new dlgRunning(); dlg.Text = "Выполние"; dlg.coordinator = coordinator; dlg.ShowDialog(); } }
private void button4_Click(object sender, EventArgs e) { // старт экспорта Coordinator coordinator = new Coordinator(); // setup actions coordinator.AddAction(new ActionDeploy(true)); coordinator.AddAction(new ActionPrepExportScripts()); coordinator.AddAction(new ActionClearLog()); coordinator.AddAction(new ActionToTempTransferScripts(SelectedID)); coordinator.AddAction(new ActionOracleToPDATransfer()); coordinator.AddAction(new ActionFinishExportScripts()); coordinator.AddAction(new ActionDeploy(false)); coordinator.AddAction(new ActionSetBrReadOnly(SelectedID)); // make dialog dlgRunning dlg = new dlgRunning(); dlg.Text = "Экспорт"; dlg.coordinator = coordinator; dlg.ShowDialog(); }
private void button4_Click(object sender, EventArgs e) { // получение списка мостов //List<BridgeData> list = new BridgesReader(true).Load(); // старт экспорта Coordinator coordinator = new Coordinator(); // setup actions coordinator.AddAction(new ActionDeploy(true)); coordinator.AddAction(new ActionViewLog(new dlgLog())); coordinator.AddAction(new ActionViewSessions(new dlgSessions())); coordinator.AddAction(new ActionToggleUsersOff()); coordinator.AddAction(new ActionSwitchTriggers(false, "Выключение триггеров")); coordinator.AddAction(new ActionClearOracleBr()); coordinator.AddAction(new ActionPDAToOracleTransfer()); coordinator.AddAction(new ActionSwitchTriggers(true, "Включение триггеров")); coordinator.AddAction(new ActionFinishImportScripts()); coordinator.AddAction(new ActionSetBrReadOnly(null, false)); coordinator.AddAction(new ActionDoFinally()); // make dialog dlgRunning dlg = new dlgRunning(); dlg.Text = "Импорт"; dlg.coordinator = coordinator; dlg.ShowDialog(); FinallyStack.Run(); // завершающие скрипты должны выполниться все равно }