コード例 #1
0
        private SpecInfo getRunInfo(SpecificationMethodInfo spec)
        {
            var formatter = getFormatter(spec.Specification);
            var specInfo = new SpecInfo(formatter);
            specInfo.Name = getSpecName(spec.MethodInfo.DeclaringType, spec.MethodInfo);

            spec.UpdateSkipInformation(specInfo);

            if (specInfo.Skipped.IsSkipped)
            {
                spec.Specification.EnrichDescription(specInfo, formatter);
                return specInfo;
            }

            specInfo.ReportSpecExecutionHasTriggered();

            try
            {
                spec.Specification.Run(specInfo, getFormatter(spec.Specification));
            }
            catch (Exception e)
            {
                specInfo.Exception = e;
            }

            return specInfo;
        }
コード例 #2
0
        private SpecInfo getdescriptionInfo(SpecificationMethodInfo spec)
        {
            var formatter = getFormatter(spec.Specification);
            var specInfo = new SpecInfo(formatter);
            specInfo.Name = getSpecName(spec.MethodInfo.DeclaringType, spec.MethodInfo);
            spec.Specification.EnrichDescription(specInfo, getFormatter(spec.Specification));

            spec.UpdateSkipInformation(specInfo);

            return specInfo;
        }