public virtual void test_path() { TradeReportTemplate template = parseIni("trade-report-test-path.ini"); TradeReportColumn payLegCcyColumn = TradeReportColumn.builder().value("Measures.LegInitialNotional.pay.currency").header("Pay Leg Ccy").build(); assertEquals(template.Columns.Count, 1); assertEquals(template.Columns[0], payLegCcyColumn); }
public virtual void test_ignore_failures() { TradeReportTemplate template = parseIni("trade-report-test-ignore-failures.ini"); TradeReportColumn payLegCcyColumn = TradeReportColumn.builder().value("Measures.LegInitialNotional.pay.currency").header("Pay Leg Ccy").build(); TradeReportColumn pvColumn = TradeReportColumn.builder().value("Measures.PresentValue").header("Present Value").ignoreFailures(true).build(); assertEquals(template.Columns.Count, 2); assertEquals(template.Columns[0], payLegCcyColumn); assertEquals(template.Columns[1], pvColumn); }
public virtual void test_simple_values() { TradeReportTemplate template = parseIni("trade-report-test-simple.ini"); TradeReportColumn productColumn = TradeReportColumn.builder().value("Product").header("Product").build(); TradeReportColumn pvColumn = TradeReportColumn.builder().value("Measures.PresentValue").header("Present Value").build(); assertEquals(template.Columns.Count, 2); assertEquals(template.Columns[0], productColumn); assertEquals(template.Columns[1], pvColumn); }
public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj != null && obj.GetType() == this.GetType()) { TradeReportTemplate other = (TradeReportTemplate)obj; return(JodaBeanUtils.equal(columns, other.columns)); } return(false); }
//------------------------------------------------------------------------- /// <summary> /// Returns a new trade report. /// </summary> /// <param name="calculationResults"> the results of the calculations </param> /// <param name="reportTemplate"> the template used to generate the report </param> /// <returns> a new trade report </returns> public static TradeReport of(ReportCalculationResults calculationResults, TradeReportTemplate reportTemplate) { return(TradeReportRunner.INSTANCE.runReport(calculationResults, reportTemplate)); }