Skip to content

Instantly share code, notes, and snippets.

View alistairmgreen's full-sized avatar

Alistair Green alistairmgreen

View GitHub Profile
@alistairmgreen
alistairmgreen / chocolateyinstall.txt
Created April 27, 2017 16:07
Chocolatey fails to install due to bad signature
PS C:\temp> iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
Getting latest version of the Chocolatey package for download.
Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.5.
Downloading 7-Zip commandline tool prior to extraction.
Extracting C:\Users\greena2\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\greena2\AppData\Local\T
emp\chocolatey\chocInstall...
Installing chocolatey on this machine
Import-Module : File
C:\Users\greena2\AppData\Local\Temp\chocolatey\chocInstall\tools\chocolateyInstall\helpers\chocolateyInstaller.psm1
cannot be loaded. The contents of file
@alistairmgreen
alistairmgreen / 2017-02-12T15_27_53_094Z-debug.log
Last active February 12, 2017 15:35
Compile error in angular2-redux-example
132066 info linkStuff negotiator@0.6.1
132067 silly linkStuff negotiator@0.6.1 has /home/alistair/dev/angular2-redux-example/node_modules as its parent node_modules
132068 verbose linkBins negotiator@0.6.1
132069 verbose linkMans negotiator@0.6.1
132070 silly build accepts@1.3.3
132071 info linkStuff accepts@1.3.3
132072 silly linkStuff accepts@1.3.3 has /home/alistair/dev/angular2-redux-example/node_modules as its parent node_modules
132073 verbose linkBins accepts@1.3.3
132074 verbose linkMans accepts@1.3.3
132075 silly build nested-error-stacks@1.0.2
@alistairmgreen
alistairmgreen / EntityFrameworkTesting.md
Created February 10, 2017 22:11
Entity Framework Integration Testing

Writing Tests for Entity Framework

Do You Really Want Unit Tests For Everything?

The business layer of an application should generally access the database through an abstraction such as a service, command or query class. This has two benefits:

  • It expresses our intent whilst hiding the details of the database schema and implementation.
  • We can mock the service / command / query in order to write unit tests for the business logic: "If the query returns x, then y should happen."

So far, so good. But how should we test-drive the development of the service class?