Announcing HMock 0.3

  • You can now use the WholeMethodMatcher type in an expectation to write a custom predicate that looks at more than one argument at a time when deciding whether to match a method call.
  • You can now add side-effects to methods using whenever. You should prefer to avoid this and use expectations instead, since if you’re not careful side-effects can accidentally match method calls that you weren’t looking for. But occasionally this can be very useful.
  • You can now mock methods with a polymorphic return type. There must be a Typeable constraint on the return type for this to work.

--

--

--

Software engineer, volunteer K-12 math and computer science teacher, author of the CodeWorld platform, amateur ring theorist, and Haskell enthusiast.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Penetration Testing Roadmap

Localize validation error message using data annotation in ASP.NET Boilerplate

Control your network with Evil Limiter

what i have been waiting for has come !

Make Simple Games Series: MasterMind

Learn how construction firms are leveraging construction document storage & cloud-based…

Housekeeping Before Your Office Begin in Ajax ON

AGILE & SCRUM MASTER

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Chris Smith

Chris Smith

Software engineer, volunteer K-12 math and computer science teacher, author of the CodeWorld platform, amateur ring theorist, and Haskell enthusiast.

More from Medium

Monads as Practical Functionality Providers

PipyJS — A functional style JavaScript engine for programming Pipy

Save $1 billion with the Option type

TDD in Clojure, Part 3— The London school