SortParserImpl implements SortParser { protected boolean isAscending(String orderBy) { if (orderBy == null) { return _ASC_DEFAULT; } if (_ORDER_BY_ASC.equals( com.liferay.portal.kernel.util.StringUtil.toLowerCase( orderBy))) { return true; } if (_ORDER_BY_DESC.equals( com.liferay.portal.kernel.util.StringUtil.toLowerCase( orderBy))) { return false; } return _ASC_DEFAULT; } SortParserImpl(EntityModel entityModel); @Override List<SortField> parse(String sortString);  }
@Test public void testIsAscendingAnotherValue() { Assert.assertTrue(_sortParserImpl.isAscending("reverse")); }
@Test public void testIsAscendingAscLower() { Assert.assertTrue(_sortParserImpl.isAscending("asc")); }
@Test public void testIsAscendingAscLowerAndUpper() { Assert.assertTrue(_sortParserImpl.isAscending("aSC")); }
@Test public void testIsAscendingAscUpper() { Assert.assertTrue(_sortParserImpl.isAscending("ASC")); }
@Test public void testIsAscendingDescLower() { Assert.assertTrue(!_sortParserImpl.isAscending("desc")); }
@Test public void testIsAscendingDescLowerAndUpper() { Assert.assertTrue(!_sortParserImpl.isAscending("dESC")); }
@Test public void testIsAscendingDescUpper() { Assert.assertTrue(!_sortParserImpl.isAscending("DESC")); }
@Test public void testIsAscendingEmpty() { Assert.assertTrue(_sortParserImpl.isAscending("")); }
@Test public void testIsAscendingNull() { Assert.assertTrue(_sortParserImpl.isAscending(null)); }