Over the years, I think I have seen and tried every conceivable way of generating stub data structures (fake data) for complex object graphs. It always gets hairy in java.
* * * *
A---B----C----D----E
(Pardon cheap UML)
The key issue is that there are certain relationships between the values, so a certain instance of C m...
My application connects to db and gets tree of categories from here. In debug regime I can see this big tree object and I just thought of ability to save this object somewhere on disk to use in test stubs. Like this:
mockedDao = mock(MyDao.class);
when(mockedDao.getCategoryTree()).thenReturn(mySavedObject);
Assuming mySavedObject - is...
Hi,
In our unit testing, I've got a stub object that is creating a set of data in memory to be used during unit testing so that the live database is not used.
I have unit tests that check the number of rows returned from this set using the query under test and the values supplied to the query in the test. My first issue is that because...
Hi all
Have you ever used lazy C++?
I am trying to create .CPP files out of .H files. In forum I read that it is possible with your tool but I tried touse it and I didn't succeed.
Can you help me?
I used the option -c with a Test.h file with exactly the following declaration.
class TEST_A
{
public:
TEST_A();
~TEST_A();
void foo...