//------------------------------------------------------------------------- public virtual void coverage() { YearMonthDateParameterMetadata test = YearMonthDateParameterMetadata.of(DATE, JAN2015); coverImmutableBean(test); YearMonthDateParameterMetadata test2 = YearMonthDateParameterMetadata.of(date(2014, 1, 1), YearMonth.of(2016, 2)); coverBeanEquals(test, test2); }
public virtual void test_builder_incomplete() { //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: org.joda.beans.BeanBuilder<? extends YearMonthDateParameterMetadata> builder = YearMonthDateParameterMetadata.meta().builder(); BeanBuilder <YearMonthDateParameterMetadata> builder = YearMonthDateParameterMetadata.meta().builder(); builder.set(YearMonthDateParameterMetadata.meta().date(), DATE); assertThrowsIllegalArg(() => builder.build()); }
public virtual void test_of_label() { YearMonthDateParameterMetadata test = YearMonthDateParameterMetadata.of(DATE, JAN2015, "Jan 2015"); assertEquals(test.Date, DATE); assertEquals(test.YearMonth, JAN2015); assertEquals(test.Label, "Jan 2015"); assertEquals(test.Identifier, JAN2015); }
//----------------------------------------------------------------------- public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj != null && obj.GetType() == this.GetType()) { YearMonthDateParameterMetadata other = (YearMonthDateParameterMetadata)obj; return(JodaBeanUtils.equal(date, other.date) && JodaBeanUtils.equal(yearMonth, other.yearMonth) && JodaBeanUtils.equal(label, other.label)); } return(false); }
public virtual void test_builder_defaultLabel() { //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: org.joda.beans.BeanBuilder<? extends YearMonthDateParameterMetadata> builder = YearMonthDateParameterMetadata.meta().builder(); BeanBuilder <YearMonthDateParameterMetadata> builder = YearMonthDateParameterMetadata.meta().builder(); builder.set(YearMonthDateParameterMetadata.meta().date(), DATE); builder.set(YearMonthDateParameterMetadata.meta().yearMonth(), JAN2015); YearMonthDateParameterMetadata test = builder.build(); assertEquals(test.Date, DATE); assertEquals(test.YearMonth, JAN2015); assertEquals(test.Label, "Jan15"); assertEquals(test.Identifier, JAN2015); }
public virtual void test_serialization() { YearMonthDateParameterMetadata test = YearMonthDateParameterMetadata.of(DATE, JAN2015); assertSerialization(test); }