fbpx

Gordon Pedersen

Just Give Us the Throttles We Can Use

Just Give Us the Throttles We Can Use

In the early morning on August 21, 2017, the US Navy destroyer John S McCain was in the Singapore Strait – one of the busiest waterways in the world – inbound for a port call in Singapore. Through a lot of confusion about the ship’s controls, the ship started veering port. Within about three minutes, another ship had struck […]

Using a Shim to mockup static and extension methods

For our C# unit testing, we generally use a mocking framework called Moq which makes it easy to create mock classes for injecting behaviour and verifying calls. But this only works for public instance methods and won’t work for anything static. Extension methods must be static methods within static classes, so what happens when you want […]