Hello,
I'm trying to mock some POs objects without using the database. I want to use simple JUnit tests like that:
public class MyTest {
@Test
public void testMUser() {
Properties ctx; // init ctx...;
MUser user = Muser.get(ctx, 100);
assertEquals(user.getName(), "Super User");
}
}
I don't want to use the AdempiereTestCase and runs as JUnit Plug-in Test with all the required bundles.
Can I mock the database to instance my POs from a txt file for example, json or other resource ? I tried the mockito library but it didn't work in more complex tests.
Regards,
Eduardo