Skip to content

Instantly share code, notes, and snippets.

View marcusoftnet's full-sized avatar

Marcus Hammarberg marcusoftnet

View GitHub Profile
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
@PowerShell -ExecutionPolicy bypass -file devApps.ps1
@PowerShell -ExecutionPolicy bypass -file devApps.ps1
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin - See more at: http://chocolatey.org/#sthash.LRsnLpJB.dpuf
Scenario: Demo-multiline arguments
Given a json-string like this:
"""
{
"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
public class UserListService : Nancy.NancyModule
{
// wrote this line here for clarity...
// I would probably open the DB-connection per request
// but that doesn't show what I'm doing so nice as this.
private dynamic _db = Database.Open();
public SampleModule()
{
Get["/Users/{name}"] = p => {
@marcusoftnet
marcusoftnet / UsingIObjectContainer.cs
Last active December 16, 2015 06:59
Using IObjectContainer
[Binding]
public class WebDriverSupport
{
private readonly IObjectContainer objectContainer;
public WebDriverSupport(IObjectContainer objectContainer)
{
this.objectContainer = objectContainer;
}
@marcusoftnet
marcusoftnet / ATMPageWrapper.cs
Last active December 16, 2015 06:58
Context injection example 2
public class ATMPageWrapper : FluentTest
{
public ATMPageWrapper()
{
// Initialization of ATMPageWrapper
}
}
@marcusoftnet
marcusoftnet / ContextInjection1.cs
Created April 16, 2013 09:18
Context Injection in SpecFlow 1
namespace CukeEnvySkillsmatterDemo.Specs.Steps
{
[Binding]
public class WithdrawSteps
{
// We'll inject the driver (change version by uncommenting
// lines in the using-part of this file)
private readonly Driver _driver;
public WithdrawSteps(Driver driver)
{
@marcusoftnet
marcusoftnet / NancyModuleDriver.cs
Created April 16, 2013 08:55
Nancy Module Driver
using CukeEnvySkillsmatterDemo.Web;
using CukeEnvySkillsmatterDemo.Web.Models;
using Nancy;
using Nancy.Testing;
using NUnit.Framework;
namespace CukeEnvySkillsmatterDemo.Specs.Support.Wrappers
{
public class BankModuleWrapper
{