Skip to content

Instantly share code, notes, and snippets.

View JakeGinnivan's full-sized avatar
:shipit:

Jake Ginnivan JakeGinnivan

:shipit:
View GitHub Profile
var Col = require('react-bootstrap/lib/Col')
var PageHeader = require('react-bootstrap/lib/PageHeader')
var React = require('react')
var Row = require('react-bootstrap/lib/Row')
var {connect} = require('react-redux')
var {reduxForm} = require('redux-form')
var DateInput = require('./DateInput')
var FormField = require('./FormField')
var LoadingButton = require('./LoadingButton')
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
public class Fixture
{
[Fact]
public void Should_FactMethodName()
[Fact]
public Task Fetch_WithBlogSelectedAndOneResult_DisplaysOnePost()
{
// arrange
var result = new[] { new Post() };
metaWeblogService
.GetRecentPostsAsync(Arg.Any<BlogSetting>(), Arg.Any<int>())
.Returns(()=>Task.Factory.FromResult(new []{new Post()});
public Task<User> GetUser()
{
return NGitHub(_client.Users.GetAuthenticatedUserAsync)
}
public Task<T> NGitHub<T>(Func<Action<T>, Action<Exception>, GitHubRequestAsyncHandle> call)
{
var _client = new GitHubClient
{
Authenticator = new HttpBasicAuthenticator("user", "pass")
@JakeGinnivan
JakeGinnivan / gist:1852112
Created February 17, 2012 09:22 — forked from shiftkey/gist:1852096
Testing IObservable processing
public class ExampleTest
{
private readonly List<KeyPress> outputs;
private readonly KeyProvider provider;
private readonly Subject<InterceptKeyEventArgs> subject;
private IProcessLookup processLookup;
public ExampleTest()
{
outputs = new List<KeyPress>();