Input Port Names
Impulse␣␣Impulse␣
(for the USB port)Impulse␣␣Impulse␣MIDI In␣
(for the DIN port, I think)
Output Port Names
Impulse␣␣Impulse␣
(for the USB port)
// Run this first with no args, then with 1 or more args | |
public class LambdaExample { | |
public static void main(String[] args) { | |
if(args.length > 0) { | |
lambdaA(); | |
lambdaB(); | |
} else { | |
lambdaB(); | |
lambdaA(); | |
} |
package com.dhemery.generics; | |
import java.util.Objects; | |
import java.util.function.Predicate; | |
public class GenericMethodTypeInference { | |
// Subject type and predicate input type must be the same. | |
<S> boolean test(S subject, Predicate<S> criterion) { | |
return criterion.test(subject); |
new Expectations() {{ | |
// allowing(matcher) treats the matcher not as the receiver, | |
// but as a matcher on receivers, so must use same(matcher) | |
// | |
// No matches(input) is available, so must use method("matches") | |
// | |
// No with(input) is available, so must use with(equalTo(input)) | |
allowing(same(matcher)).method("matches").with(equalTo(input)); | |
will(returnValue(false)); | |
}}; |
Hamburger Disguise | |
Music and lyrics by Dale Emery | |
The girl in the box says | |
"Welcome to the drive-up window. | |
Can I take your order?" | |
"One coke, no ice, | |
and a burger to go." | |
"Thank you. Please come again." | |
Driving down the avenue, |
blog.custom_collections = { | |
topic: { | |
link: 'topic/:topic/index.html', | |
template: 'topics.html' | |
} | |
} |
@Test | |
public void copiesPlainFilesFromSourceRootToSiteRoot() { | |
given(sourceFile("foo.txt"), withContent("foo content")); | |
when(jogger, runs()); | |
then(siteFile("foo.txt"), content(), is("foo content")); | |
} | |
@Test | |
public void copiesPlainFilesFromSourceSubdirectoryToCorrespondingSiteSubdirectory() { | |
given(sourceFile("my/subdirectory/foo.txt"), withContent("subdirectory foo content")); |
verifyThat(masterView, isPresent()); | |
verifyThat(masterView, eventually(isPresent())); | |
// What would the "when the subject satisfies a condition" example look like? Maybe this? | |
when(masterView, isPresent()).touch(); |
public class MyTest { | |
@Rule | |
public MethodRule screenshot = new ScreenshotOnFailureRule(); | |
@Test | |
public void myTest() { ... } | |
... | |
} |