コード例 #1
0
 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))
                 )
             );
 }
コード例 #2
0
ファイル: XUnitResults.cs プロジェクト: hugohaggmark/pickles
 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;
 }
コード例 #3
0
ファイル: XUnitResults.cs プロジェクト: hugohaggmark/pickles
        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;
        }
コード例 #4
0
ファイル: XUnitResults.cs プロジェクト: ppnrao/pickles
        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;
        }
コード例 #5
0
 public FeatureWithMetaInfo(FeatureDirectoryTreeNode featureNodeTreeNode, TestResult result)
     : this(featureNodeTreeNode)
 {
     Result = result;
 }