[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.
/ notes.stub Public archive

Minimalistic Lotus Notes behaviors reproduction for unit testing purpose

License

Notifications You must be signed in to change notification settings

jcornaz/notes.stub

Repository files navigation

Notes Stub

License Project status Version

Minimalistic Lotus Notes behaviors reproduction for unit testing purpose. Written in kotlin an designed to be used from kotlin or java.

The goal is to be able to create fake documents, collections, databases that will behave like Lotus Notes would need of a real notes database access. Whith it you can do unit tests of your Lotus Notes java application, without network or disk access and with better reproducibility.

Project status

This project is discontinued, and stay here for consultation purpose. The project won't be maintened and no support will be provided.

Everyone is free to fork and create derivated products.

Use exemple

With java

// Create a new document stub
DocumentStub docStub = new DocumentStub();

// Add some fields
docStub.set("MyStringField", "Hello");
docStub.set("MyNumerciField", 42);
docStub.set("MyDateTimeField", DateTime.now());

// Get the notes implementation
Document doc = stub.getImplementation();

// Pass the reference of the implementation to your code for testing purpose
System.out.println(doc.getItemValueString("MyStringField"));    // Print : "Hello"

With kotlin

// Create a new document stub
val docStub = DocumentStub()

// Add some fields
docStub["MyStringField"] = "Hello"
docStub["MyNumerciField"] = 42
docStub["MyDateTimeField"] = DateTime.now()

// Get the notes implementation
val doc = stub.implementation

// Pass the reference of the implementation to your code for testing purpose
println(doc.getItemValueString("MyStringField"));    // Print : "Hello"

Setup

This project need a Notes.jar archive, that is property of IBM and cannot be distributed. Therefore, you need a licensed installation of Lotus Notes.

  1. Start by cloning this repo : git clone --branch v0.1.1 git@github.com:jcornaz/notes.stub.git
  2. Create a folder "libs" at the root of the project and put there a copy the Notes.jar from your Lotus Notes installation.
  3. Test it : ./gradlew check

From here you can work in the project folder or add it in your project with your favorite method.

About

Minimalistic Lotus Notes behaviors reproduction for unit testing purpose

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published