• How to mock a serial port

    This question came up on the Rhino Mocks list recently, and it interested me as the application we’re working on has to talk to serial ports too.

    Two common themes emerged:

    1. Write a “thin” interface for serial port operations and create a thin wrapper class that implements this interface and calls SerialPort directly. You can then mock out the interface easily.
    2. To test the wrapper, you can make use of the com0com null-modem emulator.

    I suspect there would still be a bit of effort to get the com0com emulator working properly, but it sounds promising.

  • What a funny old fellow..

    Ok, I thought the GFC was pretty bad, but this really indicates how tough things have got.

    Humphrey B Bear (from The Age newspaper)

    I really hope that’s not a “goodbye” wave :-(

  • Happy Birthday

    Saturday was my birthday, and amongst other things I got these nice presents..

    Pride and Prejudice Blu-Ray Cover

    This is the re-mastered Blu-Ray edition of the 1995 BBC Production of Jane Austen’s Pride and Prejudice. I admit I am a bit of an Austen fan, and whilst Mr Darcy diving into the pond doesn’t seem to have the same effect on me as it does on many of the women I know, this is probably my favourite film adaptation. The icing on the cake is of course that Elizabeth’s nice Uncle and Aunty are Mr & Mrs Gardiner – Yay!

    Pinocchio 70th Anniversary Blu-Ray Cover

    Pinocchio – 70th Anniversary Edition. This film has special memories for me, and particularly so on my birthday. For growing up as a child, one of the highlights of my birthday party would be my Poppa showing his collection of short films on his Super-8 movie projector. In the era before video/DVD players, this was a real novelty. One of my favourite films was a short extract from Pinocchio - the bit where Pinocchio and Geppetto cause Monstro the whale to sneeze by lighting their fishing boat on fire (they were inside the whale at the time).

    I ended up watching the whole movie in the afternoon, but the kids found it a bit scary in places. I’m not certain, but I think that may be the first time I’ve seen the entire movie.

    Packet of Arnott's Iced Vovo biscuits

    Finally, just the thing for completing any evening’s movie watching – a packet of Iced Vo-Vos. The iced biscuit of champions!