public static StoryText GetStoryText(BDTestBase bdTestBase) { var classStoryAttribute = FindStoryAttribute(bdTestBase); if (classStoryAttribute == null) { return(null); } return(new StoryText(classStoryAttribute.GetStoryText())); }
// 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(); }
private static StoryAttribute FindStoryAttribute(BDTestBase bdTestBase) { return(bdTestBase.GetType().GetCustomAttribute(typeof(StoryAttribute)) as StoryAttribute); }
internal Given(Runnable runnable, string callerMember, string callerFile, string testId, string reportId, BDTestBase bdTestBase) : base(runnable, callerMember, callerFile, testId, reportId, StepType.Given, bdTestBase) { }
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 }