use of limelight.styles.values.SimpleIntegerValue in project limelight by slagyr.
the class StyleAttributeTest method shouldMarkAsDirtyByDefaultWhenStyleChanged.
@Test
public void shouldMarkAsDirtyByDefaultWhenStyleChanged() throws Exception {
assertEquals(false, panel.markedAsDirty);
attribute.applyChange(panel, new SimpleIntegerValue(25));
assertEquals(true, panel.markedAsDirty);
}
use of limelight.styles.values.SimpleIntegerValue in project limelight by slagyr.
the class StyleAttributeTest method shouldExpireBufferedImageCacheByDefaultWhenStyleChange.
@Test
public void shouldExpireBufferedImageCacheByDefaultWhenStyleChange() throws Exception {
Context.instance().bufferedImageCache.cache(panel, new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB));
attribute.applyChange(panel, new SimpleIntegerValue(25));
assertEquals(null, Context.instance().bufferedImageCache.retrieve(panel));
}
use of limelight.styles.values.SimpleIntegerValue in project limelight by slagyr.
the class StyleAttributeTest method setUp.
@Before
public void setUp() throws Exception {
panel = new MockChangeablePanel();
attribute = new StyleAttribute("NAME", new IntegerAttributeCompiler(), new SimpleIntegerValue(50));
Context.instance().bufferedImageCache = new SimpleCache<Panel, BufferedImage>();
}
use of limelight.styles.values.SimpleIntegerValue in project limelight by slagyr.
the class NoneableAttributeTest method testEquality.
public void testEquality() throws Exception {
assertEquals(true, none.equals(none));
assertEquals(true, none.equals(new NoneableValue<SimpleIntegerValue>(null)));
assertEquals(false, none.equals(fifty));
assertEquals(true, fifty.equals(fifty));
assertEquals(true, fifty.equals(new NoneableValue<SimpleIntegerValue>(new SimpleIntegerValue(50))));
assertEquals(false, none.equals(null));
}
Aggregations