Wednesday, 24 November 2010

eclipse, junit & static imports

It was annoying me that eclipse was not finding the static imports needed by junit 4 unit tests.

A quick google tuned up this gem, which I have grabbed below:

Open the Preferences via Window -> Preferences and select Java > Editor > Content Assist > Favorites. Add then via "New Member" the methods you need. For example this makes the assertTrue, assertFalse and assertEquals method available.

You can now use Content Assist (Ctrl+Space) to add the method and the import.

He suggests to add at least the following new members.

  • org.junit.Assert.assertTrue

  • org.junit.Assert.assertFalse

  • org.junit.Assert.assertEquals

  • org.junit.Assert.fail

I suggest also adding

  • org.junit.Assert.assertNotNull

Friday, 19 November 2010

pidgin - Unable to validate certificate error

If you are having the 'Unable to validate certificate' error from pidgin then do the following:

  1. go to here, download the certificate omega.contacts.msn.com.pem
  2. in pidgin go to tools/certificates
  3. delete the cert omega.contacts.msn.com.pem
  4. add the new downloaded cert
  5. and away you go
UPDATE - or as I have said in the comment, now you can download the new version with a fix - see or better still update to the latest version that now has the fix - http://www.pidgin.im/