GithubHelp home page GithubHelp logo

ixxus / alfresco-test-assertions Goto Github PK

View Code? Open in Web Editor NEW
4.0 58.0 0.0 44 KB

Fluent assertions for writing integration (remote unit) tests for Alfresco

Home Page: http://www.ixxus.com

License: Apache License 2.0

Java 100.00%
alfresco alfresco-repository testing integration-testing assertj assertj-assertions assertions

alfresco-test-assertions's Introduction

Ixxus

Alfresco Test Assertions

License

Fluent assertions for writing integration (remote unit) tests for Alfresco.

Syntax

Using the com.ixxus.alfresco.NodeAssert, assertions on nodes can be written like this:

assertThat(nodeRef).exists().hasAspect(ContentModel.ASPECT_EMAILED).hasPropertyValue(ContentModel.PROP_NAME, "This is a node's name");
Condition<Serializable> startsWithTitle = new Condition<>(value -> ((String) value).startsWith("title"), "Should start with 'title'");
assertThat(nodeRef).exists().propertyValue(ContentModel.PROP_TITLE, startsWithTitle);

For more examples, check out com.ixxus.alfresco.NodeAssertTest.

There's also a custom assertion for testing:

How to include the library

We are still working on deploying to maven central. At the mean time, we suggest to clone the repository and build locally.

mvn clean install

Then include as a maven dependency

<dependency>
    <groupId>com.ixxus.alfresco</groupId>
    <artifactId>alfresco-test-assertions</artifactId>
    <version><PLEASE SEE POM.XML FOR VERSION></version>
    <scope>test</scope>
</dependency>

Change log

Unreleased

Added

  • AssertJ Conditions for NodeAssert
  • WorkflowAssert in the same style as NodeAssert/SiteAssert

[1] - 2017-06-05

Added

  • Node assertion
  • Site assertion

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.