Skip to content

Instantly share code, notes, and snippets.

@bvanderveen
bvanderveen / gist:3260382
Created August 4, 2012 22:34 — forked from jacksonh/gist:3257926
Objective-C assertion ideas
- (void) assertionIdeasLikeNUnit
{
[Assert that:@"foobar" is:[Equal to:@"other"]];
[Assert that:@"foobar" isNot:[Equal to:@"other"]];
[Assert that:collection isAll:[Less than:@10]];
[Assert that:collection isAll:[Less thanOrEqualTo:@10]];
[Assert that:collection isAll:[Less thanOrEqualTo:@10]];
[Assert that:collection isAll:[Greater than:@10]];
[Assert that:collection isAll:[Greater thanOrEqualTo:@10]];
@bvanderveen
bvanderveen / BeginSendSocketTest.cs
Created June 1, 2011 17:34 — forked from jasonsirota/BeginSendSocketTest.cs
BeginSend Socket Test Mon
/*
I have a piece of .NET code that uses Asynchronous sockets that I want to cross
compile and run on Mono, however, when I attempt to run it, the AsyncCallback for
the BeginSend never gets called. I've boiled down the problem to a very simple
example. The example does not ever hit the callback, I have tried the following
configurations:
OS: Ubuntu 10.10 (Maverick Meerkat)
Mono 2.8.2 using Nathan Bridgewater's install shell script
Mono 2.10.2 using Nathan Bridgewater's updated shell script
public interface IApplication {
// either may throw exception
IAsyncResult BeginInvoke(IRequest request, AsyncCallback callback, object state);
IResponse EndInvoke(IAsyncResult result);
}