private StoryMetadata CreateSpecificationMetadata(IScenario specification) { var title = specification.GetType().GetProperty("SUT").PropertyType.Name; var story = (Story)Activator.CreateInstance(specification.Story); var storyAttribute = new StoryAttribute() { Title = title, TitlePrefix = story.TitlePrefix }; return new StoryMetadata(specification.Story, storyAttribute); }
public virtual StoryMetadata Scan(object testObject, Type explicityStoryType = null) { var specification = testObject as ISpecification; if (specification == null) return null; string specificationTitle = CreateSpecificationTitle(specification); var story = new StoryAttribute() {Title = specificationTitle}; return new StoryMetadata(specification.Story, story); }