... I got a simple integration test going and all test methods run fine ... BUT... I set up a class var
int tempId;
for use by the following methods. testSaveTag() sets the value when successfully executed ( for now everything's auto committed) and the testUpdateTag() updates the freshly created tag.
@Test
public void testSaveTag() {
Tag tag = new Tag();
tag.setDescription("Test Tag");
tempId = instance.saveTag(tag);
}
@Test
public void testUpdateTag() {
Tag tag = instance.getTag(tempId );
tag.setDescription("updated tag description!");
instance.updateTag(tag);
}
The value of tempID gets lost between the the 2 methods.
So I'm thinking "What's the proper way to do this",
... and "why is the value lost?"
Thanks in advance