コード例 #1
0
        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);
        }
コード例 #2
0
        public StoryMetaData(Type storyType, StoryAttribute storyAttribute)
        {
            var title = storyAttribute.Title;
            if (string.IsNullOrEmpty(title))
                title = NetToString.Convert(storyType.Name);

            Type = storyType;
            Title = title;

            AsA = storyAttribute.AsA;
            IWant = storyAttribute.IWant;
            SoThat = storyAttribute.SoThat;
        }
コード例 #3
0
        public StoryMetaData(Type storyType, StoryAttribute storyAttribute)
        {
            var title = storyAttribute.Title;

            if (string.IsNullOrEmpty(title))
            {
                title = NetToString.Convert(storyType.Name);
            }

            Type  = storyType;
            Title = title;

            AsA    = storyAttribute.AsA;
            IWant  = storyAttribute.IWant;
            SoThat = storyAttribute.SoThat;
        }