//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(FixedOvernightSwapConvention convention, String name)
        public virtual void test_extendedEnum(FixedOvernightSwapConvention convention, string name)
        {
            FixedOvernightSwapConvention.of(name);     // ensures map is populated
            ImmutableMap <string, FixedOvernightSwapConvention> map = FixedOvernightSwapConvention.extendedEnum().lookupAll();

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

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

            return(FixedOvernightSwapCurveNode.builder().template(template).rateId(quoteId).additionalSpread(spread).label(label).date(date).dateOrder(order).build());
        }
 public virtual void test_of_lookup_null()
 {
     assertThrowsIllegalArg(() => FixedOvernightSwapConvention.of((string)null));
 }
 public virtual void test_of_lookup_notFound()
 {
     assertThrowsIllegalArg(() => FixedOvernightSwapConvention.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(FixedOvernightSwapConvention convention, String name)
        public virtual void test_of_lookup(FixedOvernightSwapConvention convention, string name)
        {
            assertEquals(FixedOvernightSwapConvention.of(name), convention);
        }