MozFlex extends AbstractCssProperty<MozFlex> implements StateChangeInformer<CssProperty> { public void setAsInherit() { setCssValue(INHERIT); } MozFlex();  MozFlex(final String cssValue);  MozFlex(final MozFlex mozFlex); @Override String getCssName(); @Override String getCssValue(); @Override String toString(); @Override MozFlex setCssValue(final String cssValue); static boolean isValid(final String cssValue); void setAsInitial(); void setAsInherit(); void setAsAuto(); MozFlexBasis getMozFlexBasis(); MozFlexShrink getMozFlexShrink(); MozFlexGrow getMozFlexGrow(); MozFlex setMozFlexGrow(final MozFlexGrow mozFlexGrow); MozFlex setMozFlexShrink(final MozFlexShrink mozFlexShrink); MozFlex setMozFlexBasis(final MozFlexBasis mozFlexBasis); @Override void stateChanged(final CssProperty stateChangedObject); static final String INITIAL; static final String INHERIT; static final String AUTO; }
@Test public void testSetAsInherit() { final MozFlex flex = new MozFlex("2 5 25px"); final MozFlexGrow flexGrow = flex.getMozFlexGrow(); assertNotNull(flexGrow); assertTrue(flexGrow.isAlreadyInUse()); final MozFlexShrink flexShrink = flex.getMozFlexShrink(); assertNotNull(flexShrink); assertTrue(flexShrink.isAlreadyInUse()); final MozFlexBasis flexBasis = flex.getMozFlexBasis(); assertNotNull(flexBasis); assertTrue(flexBasis.isAlreadyInUse()); flex.setAsInherit(); assertNull(flex.getMozFlexGrow()); assertNull(flex.getMozFlexShrink()); assertNull(flex.getMozFlexBasis()); assertFalse(flexGrow.isAlreadyInUse()); assertFalse(flexShrink.isAlreadyInUse()); assertFalse(flexBasis.isAlreadyInUse()); }