Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #246

Merged
merged 1 commit into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .github/workflows/publish.yml

This file was deleted.

32 changes: 6 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
# JMock Library
[![Build Status](https://travis-ci.org/jmock-developers/jmock-library.svg?branch=jmock2)](https://travis-ci.org/jmock-developers/jmock-library)
[![Maven Build](https://github.com/jmock-developers/jmock-library/actions/workflows/build.yml/badge.svg)](https://github.com/jmock-developers/jmock-library/actions/workflows/build.yml)
[![Maven Central](https://img.shields.io/maven-central/v/org.jmock/jmock.svg?label=Maven%20Central)](https://mvnrepository.com/artifact/org.jmock)

# Maven
```xml
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock-junit5</artifactId>
<version>2.12.0</version>
<version>2.13.0</version>
<scope>test</scope>
</dependency>
```
# Gradle
```
testCompile(
"junit:junit5:5.3.1",
"org.jmock:jmock-junit5:2.12.0"
"org.jmock:jmock-junit5:2.13.0"
)
```
# Recent Changes
## 2.10.0
### JUnit 5 Support
- See https://github.com/jmock-developers/jmock-library/releases/tag/2.13.0

# JUnit 5 Support
* Swap @Rule JUnit4Mockery for @RegisterExtension JMock5Mockery
* Assign to a non-private JMock5Mockery or JUnit5 won't use it

Expand Down Expand Up @@ -49,27 +50,6 @@ public class JUnit5TestThatDoesSatisfyExpectations {
### JUnit 4 moved to provided scope in org.jmock:jmock
* This allows dependents to use other versions of junit or other test frameworks (e.g. junit 5)

### Java7 Support will be dropped next release

## 2.9.0
* Dropped JDK 6 compliance.
* Exposed the InvocationDispatcher so that ThreadingPolicies

## Upgrading to 2.8.X
Are you seeing NPEs?

We have had to make a breaking change to `with()`. Tests using `with(any(matcher))` for method signatures that require native types will throw `NullPointerException`.

You should change

oneOf(mock).methodWithIntParams(with(any(Integer.class)));

to the following

oneOf(mock).methodWithIntParams(with.intIs(anything());
This is due to a compiler change in Java 1.7. The 2.6.0 release was compiled with Java 1.6 so it did not suffer this problem.


# Advantages of jMock 2 over jMock 1
* Uses real method calls, not strings, so you can refactor more easily and
autocomplete in the IDE.
Expand Down
Loading