Stubs and Mixins

by Hadi Chahine   Last Updated August 14, 2019 13:05 PM

I have a question about some technique of creating stubs with mixins.
Is it complicated?
Is it informative enough?

function createAlwaysSucceedingOnAdditionAndDoesNotFindAnyUserDeveloperRepositoryStub() {
  return mixin(
      new AlwaysAdditionSucceedingUserRepositoryStub(),
      new AlwaysFindNotFindingUserRepositoryStub()

Related Questions

What does stubbing mean in programming?

Updated March 03, 2017 13:05 PM

Is using unit tests to tell a story a good idea?

Updated June 01, 2017 08:05 AM

How to go about testing un-injectable code?

Updated May 20, 2016 08:02 AM