Search in sources :

Example 1 with Align

use of com.b3dgs.lionengine.Align in project lionengine by b3dgs.

the class TextAwtTest method testAlignUnknown.

/**
 * Test align unknown.
 */
@Test
public void testAlignUnknown() {
    final Text text = Graphics.createText(Constant.FONT_DIALOG, 12, TextStyle.NORMAL);
    try {
        final Graphic g = Graphics.createGraphic();
        g.setGraphic(ToolsAwt.createImage(1, 1, java.awt.Transparency.OPAQUE).createGraphics());
        text.draw(g, 0, 0, UtilEnum.make(Align.class, "FAIL"), Constant.EMPTY_STRING);
        Assert.fail();
    } catch (final LionEngineException exception) {
        Assert.assertNotNull(exception);
    }
}
Also used : Align(com.b3dgs.lionengine.Align) LionEngineException(com.b3dgs.lionengine.LionEngineException) Graphic(com.b3dgs.lionengine.graphic.Graphic) Text(com.b3dgs.lionengine.graphic.Text) Test(org.junit.Test)

Aggregations

Align (com.b3dgs.lionengine.Align)1 LionEngineException (com.b3dgs.lionengine.LionEngineException)1 Graphic (com.b3dgs.lionengine.graphic.Graphic)1 Text (com.b3dgs.lionengine.graphic.Text)1 Test (org.junit.Test)1