public static ReportModel.Story ToStoryModel(this Story story)
        {
            if (story == null)
                return null;

            var model = new ReportModel.Story
            {
                Namespace = story.Namespace,
                Result = story.Result,
                Metadata = story.Metadata.ToStoryMetadataModel()
            };

            foreach (var scenario in story.Scenarios)
            {
                model.Scenarios.Add(scenario.ToScenarioModel());
            }

            return model;
        }
Пример #2
0
        public static ReportModel.Story ToStoryModel(this Story story)
        {
            if (story == null)
            {
                return(null);
            }

            var model = new ReportModel.Story
            {
                Namespace = story.Namespace,
                Result    = story.Result,
                Metadata  = story.Metadata.ToStoryMetadataModel()
            };

            foreach (var scenario in story.Scenarios)
            {
                model.Scenarios.Add(scenario.ToScenarioModel());
            }

            return(model);
        }