Opera 10 Beta is out

There’s now an interface to customize the Speed Dial (rather than manually editing ini files) Opera Turbo, the Opera proxy service that offers compression of web pages (suitable for low-bandwidth connections) is built in and can be switched on or off or set to auto mode (turning itself on if it detects you’re on a slow internet connection). I have tested this out while I’m on 64kbps, and it’s ok but it’s probably not worth it unless Opera have some New Zealand or Australia proxies. I suspect it would work great in Europe.]]>

Unit testing multi-threaded, asynchronous code and/or events

ManualResetEvent class (MSDN) seems a good choice for this, and this post has a small example of using it in a unit test:


[Test()]
public void AfterRunAsync()
{
    ManualResetEvent manualEvent = new ManualResetEvent(false);

    TestTestCase tc = new TestTestCase(1, "", 0, 0);
    bool eventFired = false;
    tc.RunCompleted +=
        delegate(object sender, AsyncCompletedEventArgs e) {
            Assert.IsInstanceOfType(typeof (TestTestCase), sender, "sender is TestCase");
            bool passed = tc.Passed;
            string output = tc.Output;
            eventFired = true;
            manualEvent.Set();
        };
    tc.RunAsync();
    manualEvent.WaitOne(500, false);
    Assert.IsTrue(eventFired, "RunCompleted fired");
}
]]>