java - How to organise the tests of an expensive object -
i have class want test junit. creating of object of type involves lot of io, takes 5 seconds.
a mutable , want test different methods change a. in kind of dilemma:
- if create virgin object every test method, takes long.
- creating 1 huge test method lot of asserts seems bad idea isolate causes of possible errors.
- "repairing" object of type after each test methods seems dangerous because if repairing not done correctly, other test methods might fail without proper reason.
- i create deep copy of instance of every test method, means have change class test it.
what suggest?
Comments
Post a Comment