public PriceIndex toPriceIndex() { if (!type.Price) { throw new System.InvalidOperationException("Incorrect index type, expected Price: " + externalName); } return(PriceIndex.of(indexName)); }
public virtual void test_gbpHicp() { PriceIndex test = PriceIndex.of("GB-HICP"); assertEquals(test.Name, "GB-HICP"); assertEquals(test.Currency, GBP); assertEquals(test.Region, GB); assertEquals(test.Active, true); assertEquals(test.PublicationFrequency, Frequency.P1M); assertEquals(test.FloatingRateName, FloatingRateName.of("GB-HICP")); assertEquals(test.ToString(), "GB-HICP"); }
//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(PriceIndex convention, String name) public virtual void test_of_lookup(PriceIndex convention, string name) { assertEquals(PriceIndex.of(name), convention); }
public virtual void test_of_lookup_null() { assertThrowsIllegalArg(() => PriceIndex.of(null)); }
public virtual void test_of_lookup_notFound() { assertThrowsIllegalArg(() => PriceIndex.of("Rubbish")); }