@Test public void test_getKeyColumnName() { final TypedSqlQuery<I_C_Invoice> query = new TypedSqlQuery<I_C_Invoice>(getCtx(), I_C_Invoice.class, null, getTrxName()); Assert.assertEquals( "Invalid key column for " + query, "C_Invoice_ID", query.getKeyColumnName()); }
@Test(expected = DBException.class) public void test_getKeyColumnName_CompositePrimaryKey() { final TypedSqlQuery<I_M_Cost> query = new TypedSqlQuery<I_M_Cost>(getCtx(), I_M_Cost.class, null, getTrxName()); // shall throw exception query.getKeyColumnName(); }