示例#1
0
        public static StoryText GetStoryText(BDTestBase bdTestBase)
        {
            var classStoryAttribute =
                FindStoryAttribute(bdTestBase);

            if (classStoryAttribute == null)
            {
                return(null);
            }

            return(new StoryText(classStoryAttribute.GetStoryText()));
        }
示例#2
0
        // First Test Construction - Given or When
        internal StepBuilder(Runnable runnable, string callerMember, string callerFile, string testId, string reportId, StepType stepType, BDTestBase bdTestBase)
        {
            BdTestBase   = bdTestBase;
            CallerMember = callerMember;
            CallerFile   = callerFile;
            TestId       = testId;
            ReportId     = reportId;

            var testGuid = System.Guid.NewGuid();

            Guid = testGuid.ToString();
            TestOutputData.TestId = testGuid;

            ExistingSteps = new List <Step> {
                new Step(runnable, stepType, Guid, ReportId)
            };

            TestHolder.NotRun[testGuid.ToString()] = this;

            StoryText = StoryTextHelper.GetStoryText(bdTestBase);
            SetScenarioText();
            CustomTestInformation = TestInformationAttributeHelper.GetTestInformationAttributes();
        }
示例#3
0
 private static StoryAttribute FindStoryAttribute(BDTestBase bdTestBase)
 {
     return(bdTestBase.GetType().GetCustomAttribute(typeof(StoryAttribute)) as StoryAttribute);
 }
示例#4
0
 internal Given(Runnable runnable, string callerMember, string callerFile, string testId, string reportId, BDTestBase bdTestBase) : base(runnable, callerMember, callerFile, testId, reportId, StepType.Given, bdTestBase)
 {
 }
示例#5
0
文件: When.cs 项目: thomhurst/BDTest
 internal When(Runnable runnable, string callerMember, string callerFile, string testId, string reportId, BDTestBase bdTestBase) : base(runnable, callerMember, callerFile, testId, reportId, StepType.When, bdTestBase)
 {
     // Used for skipping a 'Given' step
 }