About

Jadira is the home for Sousan and Chris Pheby's open source projects. These are reusable open source Java modules that provide first class solutions using the most effective current JEE technologies.

Search
Tag Cloud
...
Login
Monday
Jun092008

Hidden Start

 Hidden Start is a great utility that is essential for when you are using Windows Vista. Two key use cases are the launching of commandline utilities in the background, and the quiet use of unsigned executables that normally trigger a security warning and confirmation dialog.

 In the latter case, I've made use of HStart together with UMPCScrollbar so that UMPCScrollbar can be included in the Startup group without a warning at each logon.

 I also use this tool with Exact Audio Copy, so ensuring that the commandline Flac encoder can be launched in the background without a console.

 HStart is a free (as in beer) download, and has 32-bit and 64-bit flavours.

Monday
Jun092008

Comprehensive Java Artifacts Repository

 CJAR - the Comprehensive Java Artifacts Repository - is rapidly becoming an essential Maven repository search tool that I use daily. The site indexes the main Maven repositories allowing you to search by all or part of a module name - or even by the names of files with in a module. This makes it easy to locate Maven archive for third party libraries you are looking to incorporate.

Monday
Jun092008

Better Assertions with Hamcrest

 James Strachan recently linked a library which is probably not so well known. This tool is so simple and useful, that, at the risk of repeating some that blog post, I'm going to talk a little about it.

 This is Hamcrest, an interesting new item for my testing toolkit, that complements well, EasyMock and JUnit 4. Hamcrest is a framework for writing matcher objects allowing 'match' rules to be defined declaratively. Effectively these can provide a  much richer set of assertions than those that come out of the box with JUnit, as well as providing assertions which are much closer to being English readable..

 The following example from the Hamcrest Tutorial give a good flavour of what Hamcrest gives you:

assertThat("hazelnuts",theBiscuit.getHazelnutCount(),equalTo(3));

 Hamcrest provides a simple framework for building new assertions, and integrates with not only JUnit, but also TestNG and other frameworks also.

 Like all good tools, Hamcrest has been published to Ibiblio. The following snippet is all you need to exploit Hamcrest from Maven:

<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.1</version>
</dependency> 
Page 1 ... 6 7 8 9 10