Play! Mockito Module


License

License

unknown
Categories

Categories

Maven Build Tools Mockito Unit Testing
GroupId

GroupId

com.google.code.maven-play-plugin.org.playframework.modules.mockito
ArtifactId

ArtifactId

play-mockito
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Play! Mockito Module
Play! Mockito Module
Source Code Management

Source Code Management

https://github.com/eamelink/play-mockito

Download play-mockito

How to add to project

<!-- https://jarcasting.com/artifacts/com.google.code.maven-play-plugin.org.playframework.modules.mockito/play-mockito/ -->
<dependency>
    <groupId>com.google.code.maven-play-plugin.org.playframework.modules.mockito</groupId>
    <artifactId>play-mockito</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.google.code.maven-play-plugin.org.playframework.modules.mockito/play-mockito/
implementation 'com.google.code.maven-play-plugin.org.playframework.modules.mockito:play-mockito:0.1'
// https://jarcasting.com/artifacts/com.google.code.maven-play-plugin.org.playframework.modules.mockito/play-mockito/
implementation ("com.google.code.maven-play-plugin.org.playframework.modules.mockito:play-mockito:0.1")
'com.google.code.maven-play-plugin.org.playframework.modules.mockito:play-mockito:jar:0.1'
<dependency org="com.google.code.maven-play-plugin.org.playframework.modules.mockito" name="play-mockito" rev="0.1">
  <artifact name="play-mockito" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.google.code.maven-play-plugin.org.playframework.modules.mockito', module='play-mockito', version='0.1')
)
libraryDependencies += "com.google.code.maven-play-plugin.org.playframework.modules.mockito" % "play-mockito" % "0.1"
[com.google.code.maven-play-plugin.org.playframework.modules.mockito/play-mockito "0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
com.google.code.maven-play-plugin.com.google.code.eamelink-mockito : mockito-all jar 1.9.1-20110911

provided (1)

Group / Artifact Type Version
com.google.code.maven-play-plugin.org.playframework : play jar 1.2

Project Modules

There are no modules declared in this project.

Play Mockito module Unmaintained

THIS MODULE IS NOT MAINTAINED ANYMORE

Mockito is slightly incompatible with Play, for two reasons:

  • Mockito caches classes, causing class cast exceptions when play reloads them after modification.
  • Mockito uses a classloader to find the MockitoConfiguration class, that does not find source java files as used in Play.

This plugin solves those problems by:

  • Shipping a minimally modified mockito in which you can disable the cache.
  • Shipping a compiled MockitoConfiguration class that will be found by Mockito.

Hopefully, the patch for the first issue will be accepted upstream, so that this plugin no longer needs to ship a modified Mockito in the future.

UPDATE

I believe a patch for the first issue has been accepted a long time ago, and this plugin can be much simplified; no modified Mockito needs to be shipped anymore.

License

Copyright 2011 Erik Bakker (http://eamelink.net).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Versions

Version
0.1