State vs behaviour testing on code which doesn't cross integration boundaries -


i have method has data objects passed it, calculations populate empty fields on objects based on other fields , sends results. method not cross integration boundaries - data objects entities complex tree of dependencies on other entities, method's perspective objects state (thank orm).

it seems me unit testing require check of state - set data, run code calculations , check results. legitimate case ignoring seems across board advice tests should check behaviour, not state? or misreading test-driven literature somewhat?

i'd you're testing behaviour of method calculations, it's not problem.

some people might suggest having behaviour in separate method (as service) , not on classes hold data code smell, that's different issue.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -