@Test public void testEvents() { JUnitUtil.testSetter(d_mgDay, DoseUnit.PROPERTY_UNIT, d_gram, d_meter); JUnitUtil.testSetter( d_mgDay, DoseUnit.PROPERTY_SCALE_MODIFIER, ScaleModifier.MILLI, ScaleModifier.KILO); JUnitUtil.testSetter( d_mgDay, DoseUnit.PROPERTY_PER_TIME, EntityUtil.createDuration("P1D"), EntityUtil.createDuration("PT1H")); }
@Test public void testEquals() { assertFalse(d_mgDay.equals(d_kgHr)); assertEntityEquals(d_mgDay, d_mgDay); DoseUnit du = new DoseUnit(new Unit("gram", "gg"), ScaleModifier.MILLI, EntityUtil.createDuration("P1D")); DoseUnit du2 = new DoseUnit(new Unit("gram", "gg"), ScaleModifier.MILLI, EntityUtil.createDuration("P1D")); assertEntityEquals(du, du2); assertEquals(d_mgDay, du); assertFalse(d_mgDay.deepEquals(du)); }