//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(dataProvider = "name") public void test_extendedEnum(FixedInflationSwapConvention convention, String name)
        public virtual void test_extendedEnum(FixedInflationSwapConvention convention, string name)
        {
            FixedInflationSwapConvention.of(name);     // ensures map is populated
            ImmutableMap <string, FixedInflationSwapConvention> map = FixedInflationSwapConvention.extendedEnum().lookupAll();

            assertEquals(map.get(name), convention);
        }
Ejemplo n.º 2
0
        private static CurveNode curveFixedInflationCurveNode(string conventionStr, string timeStr, string label, QuoteId quoteId, double spread, CurveNodeDate date, CurveNodeDateOrder order)
        {
            Matcher matcher = SIMPLE_YM_TIME_REGEX.matcher(timeStr.ToUpper(Locale.ENGLISH));

            if (!matcher.matches())
            {
                throw new System.ArgumentException(Messages.format("Invalid time format for Fixed-Inflation swap: {}", timeStr));
            }
            Period periodToEnd = Period.parse("P" + matcher.group(1));
            FixedInflationSwapConvention convention = FixedInflationSwapConvention.of(conventionStr);
            FixedInflationSwapTemplate   template   = FixedInflationSwapTemplate.of(Tenor.of(periodToEnd), convention);

            return(FixedInflationSwapCurveNode.builder().template(template).rateId(quoteId).additionalSpread(spread).label(label).date(date).dateOrder(order).build());
        }
 public virtual void test_of_lookup_null()
 {
     assertThrowsIllegalArg(() => FixedInflationSwapConvention.of((string)null));
 }
 public virtual void test_of_lookup_notFound()
 {
     assertThrowsIllegalArg(() => FixedInflationSwapConvention.of("Rubbish"));
 }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(dataProvider = "name") public void test_of_lookup(FixedInflationSwapConvention convention, String name)
        public virtual void test_of_lookup(FixedInflationSwapConvention convention, string name)
        {
            assertEquals(FixedInflationSwapConvention.of(name), convention);
        }