コード例 #1
0
        private void PrintCaseTableContent(IReportInfo report, ICaseInfo @case, ICollection <IRemark> remarks)
        {
            int procedureWidth = 19;
            int nameWidth      = this.width - 2 * procedureWidth;

            foreach (ISubjectInfo subject in report.GetSubjects())
            {
                IResultData serialization   = report.GetSerializationData(subject, @case);
                IResultData deserialization = report.GetDeserializationData(subject, @case);

                this.output.Write(subject.Name.PadRight(nameWidth));
                this.output.Write(serialization.Describe().PadLeft(procedureWidth));
                this.output.Write(deserialization.Describe().PadLeft(procedureWidth));
                this.output.WriteLine();

                if (serialization.HasRemark())
                {
                    remarks.Add(serialization.GetRemark());
                }

                if (deserialization.HasRemark())
                {
                    remarks.Add(deserialization.GetRemark());
                }
            }
        }
コード例 #2
0
        private void PrintCaseTableContent(IReportInfo report, ICaseInfo @case, ICollection<IRemark> remarks)
        {
            int procedureWidth = 19;
            int nameWidth = this.width - 2 * procedureWidth;

            foreach (ISubjectInfo subject in report.GetSubjects())
            {
                IResultData serialization = report.GetSerializationData(subject, @case);
                IResultData deserialization = report.GetDeserializationData(subject, @case);

                this.output.Write(subject.Name.PadRight(nameWidth));
                this.output.Write(serialization.Describe().PadLeft(procedureWidth));
                this.output.Write(deserialization.Describe().PadLeft(procedureWidth));
                this.output.WriteLine();

                if (serialization.HasRemark())
                {
                    remarks.Add(serialization.GetRemark());
                }

                if (deserialization.HasRemark())
                {
                    remarks.Add(deserialization.GetRemark());
                }
            }
        }
コード例 #3
0
ファイル: Result.cs プロジェクト: amacal/Quality.Json
 public Result(ICaseInfo @case, IProcedure procedure, ISubjectInfo subject, IResultData data)
 {
     this.@case = @case;
     this.procedure = procedure;
     this.subject = subject;
     this.data = data;
 }
コード例 #4
0
 public Result(ICaseInfo @case, IProcedure procedure, ISubjectInfo subject, IResultData data)
 {
     this.@case     = @case;
     this.procedure = procedure;
     this.subject   = subject;
     this.data      = data;
 }
コード例 #5
0
ファイル: Report.cs プロジェクト: amacal/Quality.Json
 public IResultData GetSerializationData(ISubjectInfo subject, ICaseInfo @case)
 {
     return this.items
         .Where(x => x.Subject == subject)
         .Where(x => x.Case == @case)
         .Where(x => x.Procedure.Name == "Serialize")
         .Select(x => x.Data)
         .DefaultIfEmpty(new NotSupportedRequirementResult())
         .FirstOrDefault();
 }
コード例 #6
0
 public IResultData GetSerializationData(ISubjectInfo subject, ICaseInfo @case)
 {
     return(this.items
            .Where(x => x.Subject == subject)
            .Where(x => x.Case == @case)
            .Where(x => x.Procedure.Name == "Serialize")
            .Select(x => x.Data)
            .DefaultIfEmpty(new NotSupportedRequirementResult())
            .FirstOrDefault());
 }
コード例 #7
0
        private void PrintCaseTableHeader(ICaseInfo @case)
        {
            int procedureWidth = 19;
            int nameWidth      = this.width - 2 * procedureWidth;

            this.output.WriteLine(new String('-', this.width));
            this.output.Write("Name".PadRight(nameWidth));
            this.output.Write("Serialization".PadLeft(procedureWidth));
            this.output.Write("Deserialization".PadLeft(procedureWidth));
            this.output.WriteLine();
            this.output.WriteLine(new String('-', this.width));
        }
コード例 #8
0
        private void PrintCaseTableHeader(ICaseInfo @case)
        {
            int procedureWidth = 19;
            int nameWidth = this.width - 2 * procedureWidth;

            this.output.WriteLine(new String('-', this.width));
            this.output.Write("Name".PadRight(nameWidth));
            this.output.Write("Serialization".PadLeft(procedureWidth));
            this.output.Write("Deserialization".PadLeft(procedureWidth));
            this.output.WriteLine();
            this.output.WriteLine(new String('-', this.width));
        }
コード例 #9
0
 private void PrintCaseTable(IReportInfo report, ICaseInfo @case, ICollection <IRemark> remarks)
 {
     this.PrintCaseTableHeader(@case);
     this.PrintCaseTableContent(report, @case, remarks);
     this.PrintCaseTableFooter();
 }
コード例 #10
0
 private void PrintCaseHeader(ICaseInfo @case)
 {
     output.WriteLine("Case: {0}", @case.Name);
     output.WriteLine("Requirements: {0}", String.Join(", ", @case.GetRequirements().Select(x => x.Name).DefaultIfEmpty("none")));
     output.WriteLine();
 }
コード例 #11
0
 private void PrintCaseTable(IReportInfo report, ICaseInfo @case, ICollection<IRemark> remarks)
 {
     this.PrintCaseTableHeader(@case);
     this.PrintCaseTableContent(report, @case, remarks);
     this.PrintCaseTableFooter();
 }
コード例 #12
0
 private void PrintCaseHeader(ICaseInfo @case)
 {
     output.WriteLine("Case: {0}", @case.Name);
     output.WriteLine("Requirements: {0}", String.Join(", ", @case.GetRequirements().Select(x => x.Name).DefaultIfEmpty("none")));
     output.WriteLine();
 }
コード例 #13
0
 public CaseGroup(ICaseInfo @case, IInstance[] instances)
 {
     this.@case     = @case;
     this.instances = instances;
 }
コード例 #14
0
ファイル: TestSuit.cs プロジェクト: amacal/Quality.Json
 public CaseGroup(ICaseInfo @case, IInstance[] instances)
 {
     this.@case = @case;
     this.instances = instances;
 }