jconunit

This library is able to facilitate unit testing in concurrent environment.

License

License

GroupId

GroupId

com.github.mfathi91
ArtifactId

ArtifactId

jconunit
Last Version

Last Version

3.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

jconunit
This library is able to facilitate unit testing in concurrent environment.
Project URL

Project URL

https://github.com/mfathi91/jconunit
Source Code Management

Source Code Management

https://github.com/mfathi91/jconunit.git

Download jconunit

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.mfathi91/jconunit/ -->
<dependency>
    <groupId>com.github.mfathi91</groupId>
    <artifactId>jconunit</artifactId>
    <version>3.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.mfathi91/jconunit/
implementation 'com.github.mfathi91:jconunit:3.0.0'
// https://jarcasting.com/artifacts/com.github.mfathi91/jconunit/
implementation ("com.github.mfathi91:jconunit:3.0.0")
'com.github.mfathi91:jconunit:jar:3.0.0'
<dependency org="com.github.mfathi91" name="jconunit" rev="3.0.0">
  <artifact name="jconunit" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.mfathi91', module='jconunit', version='3.0.0')
)
libraryDependencies += "com.github.mfathi91" % "jconunit" % "3.0.0"
[com.github.mfathi91/jconunit "3.0.0"]

Dependencies

test (2)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-engine jar 5.2.0
org.mockito : mockito-core jar 2.18.3

Project Modules

There are no modules declared in this project.

Maven Central Coverity Scan Build Status

JConUnit

JConUnit is a tiny library for unit testing in multithreaded environment. As so far JUnit has not added concurrent execution to its framework, this library can be used to facilitate concurrent unit testing.

Instructions

Maven

Include the following to your dependency list:

<dependency>
    <groupId>com.github.mfathi91</groupId>
    <artifactId>jconunit</artifactId>
    <version>3.0.0</version>
    <scope>test</scope>
</dependency>

Usage

For instance one may use JConUnit like the following codes:

@Tese
public void junitTestMethod(){
    ThreadSafeClass threadSafe = new ThreadSafeClass();
    List<Runnable> runnables = Collections.nCopy(10, threadSafe::foo);
    // 'foo' method is designed to not throw any exception in multithreaded environment
    JConUnit.assertDoesNotThrowException(runnables);
}

or

@Tese
public void junitTestMethod(){
    ThreadSafeClass threadSafe = new ThreadSafeClass();
    List<Runnable> runnables = Collections.nCopy(2, threadSafe::bar);
    // 'bar' method is designed to throw IllegalStateException when it is 
    // accessed from multiple threads
    JConUnit.assertThrows(IllegalStateException.class, runnables);
}

Requirements

This version of Persian Date Time requires:

  • Java SE 8

License

This library is released under MIT license.

Versions

Version
3.0.0
2.1.0
1.1.0
1.0.0