public DocumentCreationHelperTests() { _documentCreation = new DocumentCreationHelper(_mockElementMapper.Object); }
/// <summary> /// Creates a LABELS document based off the template and lable type. /// </summary> /// <param name="template">The template of the document to create.</param> /// <param name="lbltype">The label type of the document.</param> private void runCreateDocument(string template, DocumentCreationHelper.enumLabeltype lbltype) { try { Cursor.Current = Cursors.WaitCursor; UpdateControls(false); object[] parameters = new object[] { template, lbltype }; worker.RunWorkerAsync(parameters); } catch (Exception ex) { if (ex.Message.Contains("No Data")) MessageBox.Show("No data was loaded."); else MessageBox.Show(string.Format("Exception Caught: {0}{1}{1}{2}", ex.Message, Environment.NewLine, ex.StackTrace), "Error Dialog", MessageBoxButtons.OK, MessageBoxIcon.Error); } }