Skip to content

Instantly share code, notes, and snippets.

View AndyHitchman's full-sized avatar

Andy Hitchman AndyHitchman

  • Melbourne, Australia
View GitHub Profile
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@AndyHitchman
AndyHitchman / PersistenenceSpecification.cs
Created October 23, 2012 23:28
Ensure integration tests on a database are isolated
namespace FastTrack.Model.Specifications
{
using HibernatingRhinos.Profiler.Appender.NHibernate;
using NHibernate;
using SMS.Foundation.Specifications;
using StructureMap;
public abstract class PersistenceSpecification : Specification
{
static PersistenceSpecification()
output =
(from i in session.Query<Input>()
select i)
.Project().To<Output>(
mapper =>
mapper
.Map(o => o.BasicCustom, i => i.Custom)
.Map(o => o.WackyCustom, i => "modified " + i.Custom)
.Ignore(o => o.Ignored)
)