assertEquals("right", cssStyle.getAttribute("text-align"));
}
public void testHorizontalWithComponentRTL() {
Alignment alignment;
CssStyle cssStyle = new CssStyle();
Component component = new NullComponent();
component.setLayoutDirection(LayoutDirection.RTL);
alignment = new Alignment(Alignment.DEFAULT, Alignment.DEFAULT);
AlignmentRender.renderToStyle(cssStyle, alignment, component);
assertNull(cssStyle.getAttribute("text-align"));
alignment = new Alignment(Alignment.TOP, Alignment.DEFAULT); // Invalid
AlignmentRender.renderToStyle(cssStyle, alignment, component);
assertNull(cssStyle.getAttribute("text-align"));
alignment = new Alignment(Alignment.LEFT, Alignment.DEFAULT);
AlignmentRender.renderToStyle(cssStyle, alignment, component);
assertEquals("left", cssStyle.getAttribute("text-align"));
alignment = new Alignment(Alignment.CENTER, Alignment.DEFAULT);
AlignmentRender.renderToStyle(cssStyle, alignment, component);
assertEquals("center", cssStyle.getAttribute("text-align"));
alignment = new Alignment(Alignment.RIGHT, Alignment.DEFAULT);
AlignmentRender.renderToStyle(cssStyle, alignment, component);
assertEquals("right", cssStyle.getAttribute("text-align"));
alignment = new Alignment(Alignment.TRAILING, Alignment.DEFAULT);
AlignmentRender.renderToStyle(cssStyle, alignment, component);
assertEquals("left", cssStyle.getAttribute("text-align"));
alignment = new Alignment(Alignment.LEADING, Alignment.DEFAULT);
AlignmentRender.renderToStyle(cssStyle, alignment, component);
assertEquals("right", cssStyle.getAttribute("text-align"));
}