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()); } } }
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()); } } }
public Result(ICaseInfo @case, IProcedure procedure, ISubjectInfo subject, IResultData data) { this.@case = @case; this.procedure = procedure; this.subject = subject; this.data = data; }
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(); }
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()); }
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)); }
private void PrintCaseTable(IReportInfo report, ICaseInfo @case, ICollection <IRemark> remarks) { this.PrintCaseTableHeader(@case); this.PrintCaseTableContent(report, @case, remarks); this.PrintCaseTableFooter(); }
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(); }
private void PrintCaseTable(IReportInfo report, ICaseInfo @case, ICollection<IRemark> remarks) { this.PrintCaseTableHeader(@case); this.PrintCaseTableContent(report, @case, remarks); this.PrintCaseTableFooter(); }
public CaseGroup(ICaseInfo @case, IInstance[] instances) { this.@case = @case; this.instances = instances; }