private TenorCdsTemplate(AccrualStart accrualStart, Tenor tenor, CdsConvention convention)
 {
     JodaBeanUtils.notNull(accrualStart, "accrualStart");
     JodaBeanUtils.notNull(tenor, "tenor");
     JodaBeanUtils.notNull(convention, "convention");
     this.accrualStart = accrualStart;
     this.tenor        = tenor;
     this.convention   = convention;
 }
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 1071260659:         // accrualStart
                    this.accrualStart = (AccrualStart)newValue;
                    break;

                case 110246592:         // tenor
                    this.tenor = (Tenor)newValue;
                    break;

                case 2039569265:         // convention
                    this.convention = (CdsConvention)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
 public virtual void test_of_lookup_null()
 {
     assertThrows(() => AccrualStart.of(null), typeof(System.ArgumentException));
 }
 public virtual void test_of_lookup_notFound()
 {
     assertThrows(() => AccrualStart.of("Rubbish"), typeof(System.ArgumentException));
 }
//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(AccrualStart convention, String name)
        public virtual void test_of_lookup(AccrualStart convention, string name)
        {
            assertEquals(AccrualStart.of(name), convention);
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(dataProvider = "name") public void test_toString(AccrualStart convention, String name)
        public virtual void test_toString(AccrualStart convention, string name)
        {
            assertEquals(convention.ToString(), name);
        }
 //-------------------------------------------------------------------------
 /// <summary>
 /// Obtains a template based on the specified tenor and convention.
 /// <para>
 /// The protection end will be calculated based on standard semi-annual roll convention.
 ///
 /// </para>
 /// </summary>
 /// <param name="accrualStart">  the accrual start </param>
 /// <param name="tenor">  the tenor of the CDS </param>
 /// <param name="convention">  the market convention </param>
 /// <returns> the template </returns>
 public static TenorCdsTemplate of(AccrualStart accrualStart, Tenor tenor, CdsConvention convention)
 {
     return(new TenorCdsTemplate(accrualStart, tenor, convention));
 }