public Boolean Equals(Query q) { if (!(queryString.Equals(q.getqueryString()))) { return(false); } if (!(ylo.Equals(q.getylo()))) { return(false); } if (!(yhi.Equals(q.getyhi()))) { return(false); } if (!(includePatents.Equals(q.getincludePatents()))) { return(false); } if (!(id.Equals(q.getpageid()))) { return(false); } if (!(sortOrder.Equals(q.sortOrder))) { return(false); } if (!(resultType.Equals(q.resultType))) { return(false); } return(true); }
private void ValidateElementCount(HtmlDocument doc, int count, ResultType resultType) { string ending = resultType.Equals(ResultType.Inapplicable) ? "\"findings\"" : "\"htmlTable\""; string xpath = $".//*[@id=\"{resultType}Section\"]//*[contains(concat(\" \",normalize-space(@class),\" \"),{ending})]"; HtmlNodeCollection liNodes = doc.DocumentNode.SelectNodes(xpath) ?? new HtmlNodeCollection(null); Assert.AreEqual(liNodes.Count, count, $"Expected {count} {resultType}"); }
//Function to create objects according to ResultType public void loadType() { if (resultType.Equals(ResultType.AUTHOR)) { type = new Author(); } else { type = new Journal(); } }
public void CalculateGainValue(Graph graph, ResultType resultType) { GainValue = 0; List <int> loads = CalculateLoads(graph, resultType); if (resultType.Equals(ResultType.DAP)) { GainValue = loads.Max(); } else { GainValue = SumEdgeCosts(graph, loads); } }