public void RunTestsThread() { try { //1- Ok order DoLog(string.Format("Sending full regular order @{0}", Configuration.Name), Constants.MessageType.Information); Order fullOrder = OrderBuilder.BuildFullOrder(); NewOrderWrapper fullOrderWrapper = new NewOrderWrapper(fullOrder, Configuration); MessageOk.Add(fullOrder.ClOrdId, fullOrder); TimeoutOrders.Add(fullOrder.ClOrdId, DateTime.Now); DoPublishMessage(fullOrderWrapper); //2- Missing Mandatory tag test DoLog(string.Format("Sending missing tag order @{0}", Configuration.Name), Constants.MessageType.Information); Order missingTagOrder = OrderBuilder.BuildOrderMissingAccount(); NewOrderWrapper missingTagOrderWrapper = new NewOrderWrapper(missingTagOrder, Configuration); MissingTags.Add(missingTagOrder.ClOrdId, "1");//ClOrdId TimeoutOrders.Add(missingTagOrder.ClOrdId, DateTime.Now); DoPublishMessage(missingTagOrderWrapper); //3- Invalid Value tag test DoLog(string.Format("Sending invalid tag value @{0}", Configuration.Name), Constants.MessageType.Information); Order invalidValueOrder = OrderBuilder.BuildFullOrder(); invalidValueOrder.Side = Side.BuyToClose; NewOrderWrapper invalidValueOrderWrapper = new NewOrderWrapper(invalidValueOrder, Configuration); MissingTags.Add(invalidValueOrder.ClOrdId, "54");//Side TimeoutOrders.Add(invalidValueOrder.ClOrdId, DateTime.Now); DoPublishMessage(invalidValueOrderWrapper); } catch (Exception ex) { DoLog(string.Format("{0}-Critical error running tests:{1}", Configuration.Name, ex.Message), Constants.MessageType.Error); } }
//Here we will process the rejected messages and see if that's ok or not protected void ProcessReject(object param) { try { lock (TimeoutOrders) { Wrapper rejectWrapper = (Wrapper)param; string key = (string)rejectWrapper.GetField(RejectFields.KEY); string text = (string)rejectWrapper.GetField(RejectFields.Text); if (TimeoutOrders.ContainsKey(key)) { TimeoutOrders.Remove(key); } if (MessageOk.ContainsKey(key)) { string refTag = (string)rejectWrapper.GetField(RejectFields.RefTagID); //We expected the message to be ok but it was ejected DoLog(string.Format("<{0}>-Test case FAILED for Order ClOrdId = {1}. We expected the order to be ok but it was rejected. Reason={2} Tag={3}", Configuration.Name, key, text, refTag != null ? refTag : "??"), Constants.MessageType.AssertFailed); } if (MissingTags.ContainsKey(key)) { string refTag = (string)rejectWrapper.GetField(RejectFields.RefTagID); if (MissingTags[key] == refTag) { DoLog(string.Format("<{0}>-Test case OK for ClOrdId ={1}. Expected to have a message rejected for missing tag ={2} and it was rejected for that tag", Configuration.Name, key, refTag), Constants.MessageType.AssertOk); } else { DoLog(string.Format("<{0}>-Test case FAILED for ClOrdId ={1}. Expected to have a message rejected for missing tag ={2} but it was rejected for tag {3}", Configuration.Name, key, MissingTags[key], refTag), Constants.MessageType.AssertFailed); } } if (ExtraTags.ContainsKey(key)) { //Validar que el error es por Extra Tags } } } catch (Exception ex) { DoLog(string.Format("{0}-Critical error processing a reject:{1}", Configuration.Name, ex.Message), Constants.MessageType.Error); } }
protected void ProcessExecutionReport(object param) { try { lock (TimeoutOrders) { Wrapper erWrapper = (Wrapper)param; string key = (string)erWrapper.GetField(ExecutionReportFields.KEY); if (TimeoutOrders.ContainsKey(key)) { TimeoutOrders.Remove(key); } if (MessageOk.ContainsKey(key)) { //We expected the message to be ok but it was ejected DoLog(string.Format("<{0}>-Test case OK for Order ClOrdId = {1}. We expected a valid ER and that was received.", Configuration.Name, key), Constants.MessageType.AssertOk); } if (MissingTags.ContainsKey(key)) { DoLog(string.Format("<{0}>-Test case FAILED for ClOrdId ={1}. Expected a missing tag {2} but received an Ok Execution Report", Configuration.Name, key, MissingTags[key]), Constants.MessageType.AssertFailed); } if (ExtraTags.ContainsKey(key)) { DoLog(string.Format("<{0}>-Test case FAILED for ClOrdId ={1}. Expected an extra tag {2} but received an Ok Execution Report", Configuration.Name, key, ExtraTags[key]), Constants.MessageType.AssertFailed); } } } catch (Exception ex) { DoLog(string.Format("{0}-Critical error processing a execution report:{1}", Configuration.Name, ex.Message), Constants.MessageType.Error); } }
/// <inheritdoc /> /// <remarks>For this page, we only need to bind one control as all the values are stored in a single /// property.</remarks> protected override bool StoreControlValue(Control control) { MissingTags tags = MissingTags.None; #if !STANDALONEGUI if (this.ProjectMgr == null) { return(false); } #else if (this.CurrentProject == null) { return(false); } #endif if (chkAutoDocumentConstructors.Checked) { tags |= MissingTags.AutoDocumentCtors; } if (chkAutoDocumentDisposeMethods.Checked) { tags |= MissingTags.AutoDocumentDispose; } if (chkShowMissingIncludeTargets.Checked) { tags |= MissingTags.IncludeTargets; } if (chkShowMissingNamespaces.Checked) { tags |= MissingTags.Namespace; } if (chkShowMissingParams.Checked) { tags |= MissingTags.Parameter; } if (chkShowMissingRemarks.Checked) { tags |= MissingTags.Remarks; } if (chkShowMissingReturns.Checked) { tags |= MissingTags.Returns; } if (chkShowMissingSummaries.Checked) { tags |= MissingTags.Summary; } if (chkShowMissingTypeParams.Checked) { tags |= MissingTags.TypeParameter; } if (chkShowMissingValues.Checked) { tags |= MissingTags.Value; } #if !STANDALONEGUI this.ProjectMgr.SetProjectProperty("MissingTags", _PersistStorageType.PST_PROJECT_FILE, tags.ToString()); #else this.CurrentProject.MSBuildProject.SetProperty("MissingTags", tags.ToString()); #endif return(true); }
//===================================================================== /// <summary> /// Constructor /// </summary> /// <overloads>There are five overloads for the constructor</overloads> protected SandcastleProject() { characterMatchEval = new MatchEvaluator(this.OnCharacterMatch); buildVarMatchEval = new MatchEvaluator(this.OnBuildVarMatch); docSources = new DocumentationSourceCollection(this); docSources.ListChanged += docSources_ListChanged; namespaceSummaries = new NamespaceSummaryItemCollection(this); namespaceSummaries.ListChanged += ItemList_ListChanged; references = new ReferenceItemCollection(this); references.ListChanged += ItemList_ListChanged; componentConfigs = new ComponentConfigurationDictionary(this); plugInConfigs = new PlugInConfigurationDictionary(this); apiFilter = new ApiFilterCollection(this); apiFilter.ListChanged += ItemList_ListChanged; helpAttributes = new MSHelpAttrCollection(this); helpAttributes.ListChanged += ItemList_ListChanged; try { loadingProperties = removeProjectWhenDisposed = true; contentPlacement = ContentPlacement.AboveNamespaces; cleanIntermediates = keepLogFile = binaryTOC = includeStopWordList = true; this.BuildLogFile = null; missingTags = MissingTags.Summary | MissingTags.Parameter | MissingTags.TypeParameter | MissingTags.Returns | MissingTags.AutoDocumentCtors | MissingTags.Namespace | MissingTags.AutoDocumentDispose; visibleItems = VisibleItems.InheritedFrameworkMembers | VisibleItems.InheritedMembers | VisibleItems.Protected | VisibleItems.ProtectedInternalAsProtected; buildAssemblerVerbosity = BuildAssemblerVerbosity.OnlyWarningsAndErrors; helpFileFormat = HelpFileFormats.HtmlHelp1; htmlSdkLinkType = websiteSdkLinkType = HtmlSdkLinkType.Msdn; help2SdkLinkType = MSHelp2SdkLinkType.Msdn; helpViewerSdkLinkType = MSHelpViewerSdkLinkType.Msdn; sdkLinkTarget = SdkLinkTarget.Blank; presentationStyle = Constants.DefaultPresentationStyle; namingMethod = NamingMethod.Guid; syntaxFilters = ComponentUtilities.DefaultSyntaxFilter; collectionTocStyle = CollectionTocStyle.Hierarchical; helpFileVersion = "1.0.0.0"; tocOrder = -1; maximumGroupParts = 2; this.OutputPath = null; this.HtmlHelp1xCompilerPath = this.HtmlHelp2xCompilerPath = this.WorkingPath = this.ComponentPath = null; this.HelpTitle = this.HtmlHelpName = this.CopyrightHref = this.CopyrightText = this.FeedbackEMailAddress = this.FeedbackEMailLinkText = this.HeaderText = this.FooterText = this.ProjectSummary = this.RootNamespaceTitle = this.PlugInNamespaces = this.TopicVersion = this.TocParentId = this.TocParentVersion = this.CatalogProductId = this.CatalogVersion = this.CatalogName = null; this.FrameworkVersion = null; language = new CultureInfo("en-US"); } finally { loadingProperties = false; } }