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

            assertEquals(map.get(name), convention);
        }
Exemplo n.º 2
0
        private static CurveNode curveOvernightIborCurveNode(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 Overnight-Ibor swap: {}", timeStr));
            }
            Period periodToEnd = Period.parse("P" + matcher.group(1));
            OvernightIborSwapConvention convention = OvernightIborSwapConvention.of(conventionStr);
            OvernightIborSwapTemplate   template   = OvernightIborSwapTemplate.of(Tenor.of(periodToEnd), convention);

            return(OvernightIborSwapCurveNode.builder().template(template).rateId(quoteId).additionalSpread(spread).label(label).date(date).dateOrder(order).build());
        }
Exemplo n.º 3
0
 public virtual void test_of_lookup_null()
 {
     assertThrowsIllegalArg(() => OvernightIborSwapConvention.of((string)null));
 }
Exemplo n.º 4
0
 public virtual void test_of_lookup_notFound()
 {
     assertThrowsIllegalArg(() => OvernightIborSwapConvention.of("Rubbish"));
 }
Exemplo n.º 5
0
//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(OvernightIborSwapConvention convention, String name)
        public virtual void test_of_lookup(OvernightIborSwapConvention convention, string name)
        {
            assertEquals(OvernightIborSwapConvention.of(name), convention);
        }