Fotolia/Fotolia-API — pull request #2 by blandger (2012-03-14 22:22:40+00:00)
Title: Added maven project build and unit tests

Hi, Olivier.

I've added sub-folder /api-client/ because I didn't want touch current code.
New /api-client/ contains complete copy of current code base from main folder but additionally it has following features:
- maven project build
- unit tests run by maven on build

If everything is ok, folders and files:
/libs
/org
example.java
Makefile
can be removed later. Dependency libraries will be downloaded by maven on first run. Additionally 'settings.xml' file should be created and put into local maven repository for correct tests run. 'settings.xml' can be created by using supplied example 'settings_example.xml' file.
I can add more info about 'how to build api library' later to Wiki.

There are one issue with current API client code.
As you can see unit test:
LoginTest.java
methods:
@Test(expected = NullPointerException.class)
public void test_incorrectLogin() throws Exception {

@Test(expected = NullPointerException.class)
public void test_incorrectLoginHttps() throws Exception {

Those two methods generate NullPointerException with incorrect credentials.

Last maven 3.0.4 version is used. Installation described here:
http://maven.apache.org/download.html#Installation
Try to configure it locally and make build.
settings.xml is necessary for unit tests. It keeps personal API KEY, login, password.

Yuriy.