/** Test of toString method, of class OrderDirection. */ @Test public void testToString() { Direction b = Direction.LONG; Direction s = Direction.SHORT; assertEquals("long", b.toString()); assertEquals("long", b.getTitle()); assertEquals("short", s.toString()); assertEquals("short", s.getTitle()); }
@Test public void test() { assertEquals(Direction.LONG, Direction.valueOf("LONG")); assertEquals(Direction.SHORT, Direction.valueOf("SHORT")); assertEquals(Direction.LONG, Direction.valueOf(Direction.LONG.name())); }