Skip to content

Instantly share code, notes, and snippets.

@dtanzer
dtanzer / BabyStepsTimerTests.cs
Created July 4, 2017 06:12
Seam for BabyStepsTimer Application
public void Click(string command)
{
if (Program.WebBrowser.InvokeRequired)
Program.WebBrowser.Invoke(new Action(() => Program.WebBrowser.Navigate($"command://{command}/")));
else
Program.WebBrowser.Navigate($"command://{command}/");
}
public string GetDisplayedText()
{
@dtanzer
dtanzer / Rules.test.js
Created July 3, 2017 16:27
Tests for a fictional hangman game, with groups
describe('Hangman - Implements the flow of a single Hangman game, given a secret word.', () => {
describe('Generates Hints from the secret word and the input', () => {
it('returns a hint that contains only underscores at the start of the game', () => { /* ... */});
['test', 'a', 'few', 'cases'].forEach(secretWord => {
it('shows a hint with the correct length for the secret word "'+secretWord+'" at the start of the game', () => {
/* ... */
});
});
@dtanzer
dtanzer / Rules.test.js
Created July 3, 2017 16:21
Tests for a fictional implementation of a hangman game
describe('Hangman - Implements the flow of a single Hangman game, given a secret word.', () => {
it('returns a hint that contains only underscores at the start of the game', () => { /* ... */});
['test', 'a', 'few', 'cases'].forEach(secretWord => {
it('shows a hint with the correct length for the secret word "'+secretWord+'" at the start of the game', () => {
/* ... */
});
});
[[['c'], 'c____'], [['c', 's'], 'c_s_s'], [['c', 's', 'e'], 'c_ses']].forEach(data => {
@dtanzer
dtanzer / build.gradle
Created December 19, 2013 05:09
Build script of android test project
buildscript {
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
classpath 'com.novoda:gradle-android-test-plugin:0.9.8-SNAPSHOT'