Skip to content

Instantly share code, notes, and snippets.

View pellehenriksson's full-sized avatar
😄
Hello world!

Pelle Henriksson pellehenriksson

😄
Hello world!
View GitHub Profile
@pellehenriksson
pellehenriksson / mocha-guide-to-testing.js
Created February 10, 2017 13:36 — forked from samwize/mocha-guide-to-testing.js
Explain Mocha's testing framework - describe(), it() and before()/etc hooks
// # Mocha Guide to Testing
// Objective is to explain describe(), it(), and before()/etc hooks
// 1. `describe()` is merely for grouping, which you can nest as deep
// 2. `it()` is a test case
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run
// before/after first/each it() or describe().
//
// Which means, `before()` is run before first it()/describe()
@pellehenriksson
pellehenriksson / Sandbox.cs
Created November 2, 2016 13:26
Autofac resolve impl. alternatives
using System;
using System.ComponentModel.Composition;
using System.Reflection;
using Autofac;
using NUnit.Framework;
namespace ReportHandlerTryout
{
[TestFixture]
public class Sandbox
@pellehenriksson
pellehenriksson / gist:aff09d7976b5c4f5b527
Created February 12, 2015 12:35
RavenDB Invalid query result when using >= operator combined with In()
public class Sandbox
{
[Fact]
public void Run_Forrest_Run()
{
var logger = LogManager.GetLogger(this.GetType().FullName);
using (var store = new DocumentStore { ConnectionStringName = "Test" })
{
store.Initialize();
@pellehenriksson
pellehenriksson / gist:2574779
Created May 2, 2012 07:24 — forked from bradwilson/gist:2417226
Ninject dependency resolver for Web API
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Web.Http.Dependencies;
using Ninject;
using Ninject.Syntax;
public class NinjectDependencyScope : IDependencyScope
{
private IResolutionRoot resolver;