Skip to content

Instantly share code, notes, and snippets.

[TestClass]
public abstract class SpecificationContext
{
[TestInitialize]
public void Init()
{
Given();
When();
}
public class DrinkOrderContext : SpecificationContext
{
protected Mock<IPriceList> drinksMenu;
protected Mock<IClock> clock;
protected List<Order> orders;
protected decimal halfPrice = 17.05m;
protected decimal fullPrice = 34.10m;
public override void Given()
{
[TestClass]
public class given_a_drink_order_when_the_customer_orders_at_friday_513 : DrinkOrderContext
{
private decimal result;
public override void When()
{
base.When();
// setup clock to be 5:13pm on Friday 28th of the June 2013
[TestClass]
public class given_a_drink_order_when_the_customer_orders_at_sunday_626pm : DrinkOrderContext
{
private decimal result;
public override void When()
{
base.When();
// setup clock to be 6:26pm on Sunday 30th of the June 2013
@stoolrossa
stoolrossa / Node_Express_Leaflet_PostGIS_Controller.js
Created February 2, 2014 11:17
Node.js + Express + Leaflet + PostGIS Controller
/**
* Module dependencies.
*/
var express = require('express');
var pg = require('pg');
var app = module.exports = express.createServer();
// Configuration
@stoolrossa
stoolrossa / Node_Express_Leaflet_PostGIS_View.haml
Created February 2, 2014 11:20
Node.js + Express + Leaflet + PostGIS View
%html
%head
%title LeanMap
%script{ type: 'text/javascript', src: 'javascripts/jquery-1.6.2.min.js' }
%script{ type: 'text/javascript', src: 'javascripts/leaflet.js' }
%link{ rel: 'stylesheet', href: 'javascripts/leaflet.css' }
%body
%div{ id: 'mapContainer', style: 'width: 800px; height: 600px;' }
:javascript
var map;