private XElement BuildImageElement(TestResult result) { return new XElement(this.xmlns + "div", new XAttribute("class", "float-right"), new XElement(this.xmlns + "img", new XAttribute("src", result.WasSuccessful ? this.htmlResourceSet.SuccessImage : this.htmlResourceSet.FailureImage), new XAttribute("title", BuildTitle(result.WasSuccessful)), new XAttribute("alt", BuildTitle(result.WasSuccessful)) ) ); }
private TestResult GetResultFromElement(XElement element) { TestResult result = new TestResult(); var resultAttribute = element.Attribute("result"); switch (resultAttribute.Value.ToLowerInvariant()) { case "skip": result.WasExecuted = false; result.WasSuccessful = false; break; case "pass": result.WasExecuted = true; result.WasSuccessful = true; break; case "fail": result.WasExecuted = true; result.WasSuccessful = false; break; default: result.WasExecuted = false; result.WasSuccessful = false; break; } return result; }
public TestResult GetExampleResult(Parser.ScenarioOutline scenarioOutline, string[] row) { var exampleElements = GetScenarioOutlineElements(scenarioOutline); TestResult result = new TestResult(); foreach (var exampleElement in exampleElements) { var signature = this.exampleSignatureBuilder.Build(scenarioOutline, row); if (signature.IsMatch(exampleElement.Attribute("name").Value.ToLowerInvariant())) { return GetResultFromElement(exampleElement); } } return result; }
public TestResult GetExampleResult(ScenarioOutline scenarioOutline, string[] row) { IEnumerable<XElement> exampleElements = GetScenarioOutlineElements(scenarioOutline); var result = new TestResult(); foreach (XElement exampleElement in exampleElements) { Regex signature = exampleSignatureBuilder.Build(scenarioOutline, row); if (signature.IsMatch(exampleElement.Attribute("name").Value.ToLowerInvariant())) { return GetResultFromElement(exampleElement); } } return result; }
public FeatureWithMetaInfo(FeatureDirectoryTreeNode featureNodeTreeNode, TestResult result) : this(featureNodeTreeNode) { Result = result; }