Skip to content

A recording and playback wrapper around our ClarityClient for creating and executing unit tests.

License

GPL-3.0, LGPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
LGPL-3.0
LICENSE.lesser
Notifications You must be signed in to change notification settings

crukci-bioinformatics/clarityclient-recorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project has been discontinued. It has been replaced by Clarity Client 2, which is a repackaging of this project and the client combined with an update to Jakarta EE 10.

There will not be any further updates to this project.

CRUK-CI Clarity API Java Client Recorder

The Cancer Research UK Cambridge Institute (CRUK-CI) Clarity Java Client provides the Java or Groovy developer a means to work with Clarity's REST API using objects rather than XML or DOM document trees. This repository provides a wrapper around our Clarity Java Client that allows the developer to record entities returned from a real Clarity server into XML files on disk that can then be used to provide unit tests without requiring access to that server and provides fixed replies that will not change as the server does.

Building

Having got this check out of the code, run:

mvn install

This will build and install the project into your local Maven cache. You'll need Maven 3.5 or newer.

Alternatively, you can add our Maven repository to your POM and let Maven do the work. Add a <repositories> section containing:

<repository>
    <id>crukci-bioinformatics</id>
    <url>https://content.cruk.cam.ac.uk/bioinformatics/maven</url>
    <releases>
        <enabled>true</enabled>
    </releases>
    <snapshots>
        <enabled>false</enabled>
    </snapshots>
</repository>

Usage

Add the JAR file file of the main Clarity client and the JAR of this project to your POM (I'm assuming you're using Maven now):

<dependency>
    <groupId>org.cruk.clarity</groupId>
    <artifactId>clarity-client</artifactId>
    <version>...</version>
</dependency>
<dependency>
    <groupId>org.cruk.clarity</groupId>
    <artifactId>clarity-client-recorder</artifactId>
    <version>...</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.glassfish.jaxb</groupId>
    <artifactId>jaxb-runtime</artifactId>
    <version>2.3.6</version>
    <scope>test</scope>
</dependency>

Fill in the tag with the version of the API.

For details of using the API, please refer to the documentation at https://crukci-bioinformatics.github.io/clarityclient-recorder

You will also need a JAXB implementation in runtime or test scope, as shown in the excerpt above. This should be one of the EE8 implementations, namely a Glassfish implementation version 2.x.x: The com.sun.xml.bind:jaxb-impl artifacts available in Maven won't work well with newer JREs.

About

A recording and playback wrapper around our ClarityClient for creating and executing unit tests.

Resources

License

GPL-3.0, LGPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
LGPL-3.0
LICENSE.lesser

Stars

Watchers

Forks

Packages

No packages published

Languages