News for hackers. Stuff that matters.
Re:Testing Without Mocks: A Pattern Language by vikinghckr on Saturday January 07, 2023 @10:51PM (#34295850)
Thanks! I really like the idea of the instrumented ExampleKeyValueStore class which can be defined like this:

  class ExampleKeyValueStore {
    ExampleKeyValueStore(KeyValueStore wrapped);
    int hit_count();
  };
That means I can use the real KeyValueStore as a dependency while still testing the caching behavior. Cool!

There are no comments on this comment yet.