Skip to main content
8 events
when toggle format what by license comment
Aug 18, 2020 at 11:23 vote accept GreenyMcDuff
Aug 17, 2020 at 10:55 answer added Flater timeline score: 2
Aug 17, 2020 at 8:58 comment added sleske Related: Is there a point to unit tests that stub and mock everything public?
Aug 17, 2020 at 8:03 answer added candied_orange timeline score: 4
Aug 17, 2020 at 7:26 comment added yoger What I usually do is to either create separate class for mock that requires that much setup/verification code or just write extension methods that are corresponding to each setup, but encapsulate the logic under simple names, eg. mock.SetupPolicyListing()
Aug 16, 2020 at 19:34 comment added πάντα ῥεῖ "With the Unit Test setups being so verbose ..." From what you posted as an example, this doesn't look overly verbose to me. Also having to mock each and every call to an underlying resource or service is just normal. I don't know what language is used there (I assume it's c#?), but if you'll need to setup the mocks in the same way repeatedly, or with just small variations, you could put that stuff into another function, which is commonly used by all test cases (or an automated SetUp method).
Aug 16, 2020 at 19:18 review First posts
Aug 25, 2020 at 16:14
Aug 16, 2020 at 19:10 history asked GreenyMcDuff CC BY-SA 4.0