The session today is mainly a hands on session but I wanted to just keep a list of recommended links to look at afterwards and I thought it might be nice to share them with others too. The list isn't well researched and is pretty much a dump of the main things I use on a regular basis. Please comment to add more if you like!
- QUnit https://qunitjs.com/
- NUnit (of course)
- Moq https://github.com/Moq/moq4 my todo mocking framework if I need one
- Machine.Specifications https://github.com/machine/machine.specifications (A framework that has quite a nice syntax although I haven't used in anger for years)
- F# for testing http://fsharpforfunandprofit.com/posts/low-risk-ways-to-use-fsharp-at-work-3/
- FSUnit https://github.com/fsprojects/FsUnit
- FSCheck https://fsharp.github.io/FsCheck/ (this will blow your mind) http://www.reactiongifs.com/r/2013/10/tim-and-eric-mind-blown.gif
There's lots of other arguments that go on around unit testing such as Mocks vs Stubs etc.. etc... For the record, I find I am using Moq less and less. I have a fairly manageable amount of dependencies that are effected when I run my acceptance tests. In most cases I just swap them out with actual fake objects so for an IReadModelRepository we have an SqlReadModelRepository and we swap that out for an InMemoryReadModelRepository. In my tests I like to properly assert that the correct things were passed into those fakes. For smaller less used dependencies or for real unit tests I do still use Moq.