Esempio n. 1
0
 public IDictionary <string, ISampler <T> > Instantiate(IFailureReportProfile profile)
 {
     return(new Dictionary <string, ISampler <T> >()
     {
         { "expected", SelectSampler(profile.ExpectedSet, profile.ThresholdSampleItem, profile.MaxSampleItem) },
         { "actual", SelectSampler(profile.ActualSet, profile.ThresholdSampleItem, profile.MaxSampleItem) },
         { "analysis", SelectSampler(profile.AnalysisSet, profile.ThresholdSampleItem, profile.MaxSampleItem) },
     });
 }
Esempio n. 2
0
        public IScoreMessageFormatter Instantiate(IFailureReportProfile profile)
        {
            switch (profile.Format)
            {
            case FailureReportFormat.Markdown:
                return(new ScoreMessageMarkdown());

            case FailureReportFormat.Json:
                return(new ScoreMessageJson());

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
        public IDataRowsMessageFormatter Instantiate(IFailureReportProfile profile, Core.ResultSet.EngineStyle style)
        {
            var factory  = new SamplersFactory <DataRow>();
            var samplers = factory.Instantiate(profile);

            switch (profile.Format)
            {
            case FailureReportFormat.Markdown:
                return(new DataRowsMessageMarkdown(style, samplers));

            case FailureReportFormat.Json:
                return(new DataRowsMessageJson(style, samplers));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 4
0
        public IItemsMessageFormatter Instantiate(IFailureReportProfile profile)
        {
            var factory  = new SamplersFactory <string>();
            var samplers = factory.Instantiate(profile);

            switch (profile.Format)
            {
            case FailureReportFormat.Markdown:
                return(new ItemsMessageMarkdown(samplers));

            case FailureReportFormat.Json:
                return(new ItemsMessageJson(samplers));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 5
0
        public ILookupViolationsMessageFormatter Instantiate(IFailureReportProfile profile)
        {
            var dataRowsFactory  = new SamplersFactory <DataRow>();
            var dataRowsSamplers = dataRowsFactory.Instantiate(profile);

            var keysCollectionFactory  = new SamplersFactory <KeyCollection>();
            var keysCollectionSamplers = keysCollectionFactory.Instantiate(profile);

            switch (profile.Format)
            {
            case FailureReportFormat.Markdown:
                return(new LookupViolationsMessageMarkdown(keysCollectionSamplers, dataRowsSamplers));

            case FailureReportFormat.Json:
                return(new ReferenceViolationsMessageJson(dataRowsSamplers));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
 public DataRowsMessage(ComparisonStyle style, IFailureReportProfile profile)
     : base(profile)
 {
     this.style = style;
 }
Esempio n. 7
0
 public DataRowsMessage(IFailureReportProfile profile)
     : base(profile)
 {
 }
Esempio n. 8
0
 public TestConfiguration(IFailureReportProfile profile)
 {
     failureReportProfile = profile;
 }
Esempio n. 9
0
 public void LoadFailureReportProfile(IFailureReportProfile profile)
 {
     FailureReportProfile = profile;
 }
Esempio n. 10
0
 public SampledFailureMessage(IFailureReportProfile profile)
     : base()
 {
     this.profile = profile;
 }
Esempio n. 11
0
 public TestConfiguration(IFailureReportProfile profile)
 {
     failureReportProfile = profile;
 }
Esempio n. 12
0
 public ItemsMessage(IFailureReportProfile profile)
     : base(profile)
 {
 }