Lessons should be created against interfaces instead of abstract classes from the container

Description

At the moment the lessons are developed against abstract classes there are a lot of dependencies towards WebSession etc (container classes) which makes testing difficult.

We should create interfaces for the lessons and developed the lessons against these interfaces. The container should provide a proxy based on the interface which provides the right connections to the container.

So the interface should only define:
getDatabaseConnection();
getWebSession();

The container should provide a proxy with the implementation of this method which provides a connection based on the real datasource.

This will help us in testing the plugin because we can create a proxy for testing the lessons which won't return a real database connection but a mock connection.

This also reduces the dependency between the container and the lessons.

Environment

None

Status

Assignee

Unassigned

Reporter

Nanne Baars

Labels

None

Priority

Major