private void ExecuteSetup(SetupXml setup) { try { foreach (var command in setup.Commands) { var skip = false; if (command is IGroupCommand) { var groupCommand = (command as IGroupCommand); if (groupCommand.RunOnce) { skip = groupCommand.HasRun; } } if (!skip) { var impl = new DecorationFactory().Get(command); impl.Execute(); if (command is IGroupCommand) { var groupCommand = (command as IGroupCommand); groupCommand.HasRun = true; } } } } catch (Exception ex) { HandleExceptionDuringSetup(ex); } }
private void ExecuteCleanup(CleanupXml cleanup) { try { foreach (var command in cleanup.Commands) { var impl = new DecorationFactory().Get(command); impl.Execute(); } } catch (Exception ex) { HandleExceptionDuringCleanup(ex); } }
private void ExecuteCleanup(CleanupXml cleanup, IDictionary <string, ITestVariable> allVariables) { var cleanupHelper = new SetupHelper(serviceLocator, allVariables); var commands = cleanupHelper.Execute(cleanup.Commands); try { foreach (var command in commands) { var impl = new DecorationFactory().Instantiate(command); impl.Execute(); } } catch (Exception ex) { HandleExceptionDuringCleanup(ex); } }
private void ExecuteSetup(SetupXml setup, IDictionary <string, ITestVariable> allVariables) { var setupHelper = new SetupHelper(serviceLocator, allVariables); var commands = setupHelper.Execute(setup.Commands); try { foreach (var command in commands) { var skip = false; if (command is IGroupCommand) { var groupCommand = (command as IGroupCommand); if (groupCommand.RunOnce) { skip = groupCommand.HasRun; } } if (!skip) { var impl = new DecorationFactory().Instantiate(command); impl.Execute(); if (command is IGroupCommand) { var groupCommand = (command as IGroupCommand); groupCommand.HasRun = true; } } } } catch (Exception ex) { HandleExceptionDuringSetup(ex); } }