Skip to content

Instantly share code, notes, and snippets.

View jsquire's full-sized avatar

Jesse Squire jsquire

View GitHub Profile
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace SomeApp.Infrastructure
{
/// <summary>
/// The set of extension methods for the <see cref="HttpRequestMessage" />
/// class.
@jsquire
jsquire / FSUnitTheoryDataMemberSample.fs
Created February 19, 2018 15:15
A sample illustrating the syntax for using a data member source for an xUnit theory with F# and FsUnit
namespace MachineLearningBook.SpamDetector.UnitTests
module DataSetTests =
open System
open FSharp.Reflection
open MachineLearningBook.SpamDetector
open Xunit
open FsUnit.Xunit
type ``Parsing a DocType should produce the expected results`` () =
@jsquire
jsquire / FsUnitSample.fs
Created February 19, 2018 15:13
A sample to illustrate the various structures that can be used for tests with F# and FSUnit.
namespace MachineLearningBook.SpamDetector.UnitTests
module SampleTests =
open System
open Xunit
open FsUnit.Xunit
// http://fsprojects.github.io/FsUnit/index.html
// http://fsprojects.github.io/FsUnit/xUnit.html
[<Fact>]
@jsquire
jsquire / phantomjs-launcher-hybrid.ps1
Last active August 29, 2015 14:16
A PhantomJS launcher script, using a hybrid approach with inline C# for observing the output event
<#
.SYNOPSIS
Launches and controls a console test run using PhantomJS
.DESCRIPTION
Launches a console test run using PhantomJS by passing a custom runner script. Output from the test run is captured by this script to allow
for a rudimentary colorization syntax such that the console messages can be colored in the Windows command prompt.
For more detailed help, please use the -Help switch.
#>
@jsquire
jsquire / phantomjs-launcher-pure.ps1
Last active May 22, 2018 15:43
A PhantomJS launcher script in pure PowerShell
<#
.SYNOPSIS
Launches and controls a console test run using PhantomJS
.DESCRIPTION
Launches a console test run using PhantomJS by passing a custom runner script. Output from the test run is captured by this script to allow
for a rudimentary colorization syntax such that the console messages can be colored in the Windows command prompt.
For more detailed help, please use the -Help switch.
#>