all blog posts

NSubstitute Tutorial

The creators of NSubstitute craved a mocking framework with comparable capabilities to the alternatives but with a shorter, more succinct syntax. They have not failed to do so and I loved the NSubstitute syntax right away.

12 Aug 2018
tutorial testing

Autohotkey Tutorial - hotkeys

First we’ll cover the basic Autohotkey hotkey syntax. Which is arguably already pretty confusing for newcomers in and by itself.

But we don’t stop there as after adding more and more hotkeys, it will also become harder and harder to think of new key combinations that are somehow still memorable. There is only so much you can do with the # (Windows) key etc.

Time for some creative hotkey combinations! ‘Advanced Hotkeys’ covers code snippets on how to run different scripts on single, double or triple key presses as well as how to differentiate between long(ish) key presses or mouse clicks. And more…

Example

; Single line hotkey
^#D::MsgBox Pressed Control + Win + D (%A_ThisHotKey%)

; Control + Win + C: Multi line script
^#C::
Run, notepad.exe
WinWait, Untitled - Notepad, , 3
Send, Dear sir,{enter}{enter}
Return
2 May 2018
autohotkey

Excel formulas cheat sheet

Companion to the EPPlus series, specifically to Part 2: Formulas.
Covering the EPPlus syntax and implemented functions.

28 Mar 2018
excel cheat-sheet

JavaScript Testing: Jasmine plugins

What would we be without some extra plugins. There are over 1000 Jasmine npm packages and we’ll cover them all here.

6 Aug 2017
tutorial testing

JavaScript Testing: Jasmine customization

Make your Jasmine experience even more luscious with custom matchers and global convenience methods.
Mock global variables in your modules with jasmine.getGlobal().pi = 3.14.

5 Aug 2017
tutorial testing

JavaScript Testing: Jasmine async syntax

Need to test async code? No problem for Jasmine. There is done() to inform Jasmine a test has finished running.

With jasmine.clock(), the value of new Date() can be manipulated.

31 May 2017
tutorial testing

JavaScript Testing: Jasmine Spies

Spies, the Jasmine implementation for mocks featuring spyOn & spyOnProperty as well as jasmine.createSpy(Obj) and how to inspect calls made.

30 May 2017
tutorial testing

JavaScript Testing: Jasmine syntax

The basic example contains the general test suite structure and the two most used matchers toBe() (===) and toEqual() (deep compare), followed by all the other matchers that come out of the box.

To finish some helpers for your workflow: how to only have certain tests run and how to exclude tests.

30 May 2017
tutorial testing