Update to 1.10.19
This commit is contained in:
parent
fd6ef95f51
commit
073f8a94a0
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/mockito-1.9.0.tar.xz
|
/mockito-1.9.0.tar.xz
|
||||||
|
/mockito-1.10.19.tar.xz
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
--- conf/mockito-core.bnd.orig 2012-09-06 14:42:08.417103606 +0200
|
diff --git a/conf/mockito-core.bnd b/conf/mockito-core.bnd
|
||||||
+++ conf/mockito-core.bnd 2012-09-06 14:43:41.391834567 +0200
|
index bd0ba61..47d07a8 100644
|
||||||
@@ -1,8 +1,3 @@
|
--- a/conf/mockito-core.bnd
|
||||||
--classpath= lib/run/com.springsource.org.junit-4.5.0.jar, \
|
+++ b/conf/mockito-core.bnd
|
||||||
- lib/run/com.springsource.org.hamcrest.core-1.1.0.jar, \
|
@@ -1,13 +1,11 @@
|
||||||
- lib/run/com.springsource.org.objenesis-1.0.0.jar
|
|
||||||
--versionpolicy=[${version;==;${@}},${version;+;${@}})
|
--versionpolicy=[${version;==;${@}},${version;+;${@}})
|
||||||
-
|
-
|
||||||
Bundle-Name= Mockito Mock Library for Java. Core bundle requires Hamcrest-core and Objenesis.
|
-Bundle-Name= Mockito Mock Library for Java. Core bundle requires Hamcrest-core and Objenesis.
|
||||||
|
+Bundle-Name= Mockito Mock Library for Java. Core bundle requires Hamcrest-core and Objenesis.
|
||||||
Bundle-SymbolicName= org.mockito.mockito-core
|
Bundle-SymbolicName= org.mockito.mockito-core
|
||||||
Bundle-Version= 1.9.0
|
Bundle-Version= ${version}
|
||||||
@@ -10,15 +5,16 @@
|
|
||||||
Export-Package= !org.mockito.asm.*, \
|
Export-Package= !org.mockito.asm.*, \
|
||||||
!org.mockito.cglib.*, \
|
!org.mockito.cglib.*, \
|
||||||
!org.mockito.internal.*, \
|
!org.mockito.internal.*, \
|
||||||
@ -18,15 +18,13 @@
|
|||||||
|
|
||||||
Import-Package= junit.*;resolution:=optional, \
|
Import-Package= junit.*;resolution:=optional, \
|
||||||
org.junit.*;resolution:=optional, \
|
org.junit.*;resolution:=optional, \
|
||||||
org.apache.tools.ant.*;resolution:=optional, \
|
@@ -15,7 +13,8 @@ Import-Package= junit.*;resolution:=optional, \
|
||||||
org.hamcrest;version="[1.0,2.0)", \
|
org.hamcrest;version="[1.0,3.0)", \
|
||||||
org.objenesis;version="[1.0,2.0)", \
|
org.objenesis;version="[2.1,3.0)", \
|
||||||
|
org.mockito.asm.signature;resolution:=optional, \
|
||||||
- org.mockito.*
|
- org.mockito.*
|
||||||
+ org.mockito.*, \
|
+ org.mockito.*, \
|
||||||
+ net.sf.cglib*
|
+ net.sf.cglib*
|
||||||
|
|
||||||
Private-Package: org.mockito.*
|
Private-Package: org.mockito.*
|
||||||
|
|
||||||
--removeheaders: Private-Package
|
|
||||||
\ No newline at end of file
|
|
||||||
+-removeheaders: Private-Package
|
|
||||||
|
@ -1,133 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# Parent 65e60f677b3cb9c40d5d37e91ce6be1897c46370
|
|
||||||
|
|
||||||
diff --git a/src/org/mockito/internal/creation/DelegatingMockitoMethodProxy.java b/src/org/mockito/internal/creation/DelegatingMockitoMethodProxy.java
|
|
||||||
--- a/src/org/mockito/internal/creation/DelegatingMockitoMethodProxy.java
|
|
||||||
+++ b/src/org/mockito/internal/creation/DelegatingMockitoMethodProxy.java
|
|
||||||
@@ -4,7 +4,7 @@
|
|
||||||
*/
|
|
||||||
package org.mockito.internal.creation;
|
|
||||||
|
|
||||||
-import org.mockito.cglib.proxy.MethodProxy;
|
|
||||||
+import net.sf.cglib.proxy.MethodProxy;
|
|
||||||
|
|
||||||
public class DelegatingMockitoMethodProxy extends AbstractMockitoMethodProxy {
|
|
||||||
|
|
||||||
diff --git a/src/org/mockito/internal/creation/MethodInterceptorFilter.java b/src/org/mockito/internal/creation/MethodInterceptorFilter.java
|
|
||||||
--- a/src/org/mockito/internal/creation/MethodInterceptorFilter.java
|
|
||||||
+++ b/src/org/mockito/internal/creation/MethodInterceptorFilter.java
|
|
||||||
@@ -8,8 +8,8 @@
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
|
|
||||||
-import org.mockito.cglib.proxy.MethodInterceptor;
|
|
||||||
-import org.mockito.cglib.proxy.MethodProxy;
|
|
||||||
+import net.sf.cglib.proxy.MethodInterceptor;
|
|
||||||
+import net.sf.cglib.proxy.MethodProxy;
|
|
||||||
import org.mockito.internal.MockitoInvocationHandler;
|
|
||||||
import org.mockito.internal.creation.cglib.CGLIBHacker;
|
|
||||||
import org.mockito.internal.invocation.*;
|
|
||||||
diff --git a/src/org/mockito/internal/creation/MockitoMethodProxy.java b/src/org/mockito/internal/creation/MockitoMethodProxy.java
|
|
||||||
--- a/src/org/mockito/internal/creation/MockitoMethodProxy.java
|
|
||||||
+++ b/src/org/mockito/internal/creation/MockitoMethodProxy.java
|
|
||||||
@@ -4,7 +4,7 @@
|
|
||||||
*/
|
|
||||||
package org.mockito.internal.creation;
|
|
||||||
|
|
||||||
-import org.mockito.cglib.proxy.MethodProxy;
|
|
||||||
+import net.sf.cglib.proxy.MethodProxy;
|
|
||||||
|
|
||||||
public interface MockitoMethodProxy {
|
|
||||||
|
|
||||||
diff --git a/src/org/mockito/internal/creation/SerializableMockitoMethodProxy.java b/src/org/mockito/internal/creation/SerializableMockitoMethodProxy.java
|
|
||||||
--- a/src/org/mockito/internal/creation/SerializableMockitoMethodProxy.java
|
|
||||||
+++ b/src/org/mockito/internal/creation/SerializableMockitoMethodProxy.java
|
|
||||||
@@ -6,7 +6,7 @@
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
-import org.mockito.cglib.proxy.MethodProxy;
|
|
||||||
+import net.sf.cglib.proxy.MethodProxy;
|
|
||||||
import org.mockito.internal.util.reflection.Whitebox;
|
|
||||||
|
|
||||||
public class SerializableMockitoMethodProxy extends AbstractMockitoMethodProxy implements Serializable {
|
|
||||||
diff --git a/src/org/mockito/internal/creation/cglib/CGLIBHacker.java b/src/org/mockito/internal/creation/cglib/CGLIBHacker.java
|
|
||||||
--- a/src/org/mockito/internal/creation/cglib/CGLIBHacker.java
|
|
||||||
+++ b/src/org/mockito/internal/creation/cglib/CGLIBHacker.java
|
|
||||||
@@ -8,7 +8,7 @@
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
|
|
||||||
import org.mockito.internal.creation.MockitoMethodProxy;
|
|
||||||
-import org.mockito.cglib.proxy.MethodProxy;
|
|
||||||
+import net.sf.cglib.proxy.MethodProxy;
|
|
||||||
|
|
||||||
public class CGLIBHacker implements Serializable {
|
|
||||||
|
|
||||||
diff --git a/src/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java b/src/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java
|
|
||||||
--- a/src/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java
|
|
||||||
+++ b/src/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java
|
|
||||||
@@ -4,7 +4,7 @@
|
|
||||||
*/
|
|
||||||
package org.mockito.internal.creation.cglib;
|
|
||||||
|
|
||||||
-import org.mockito.cglib.core.DefaultNamingPolicy;
|
|
||||||
+import net.sf.cglib.core.DefaultNamingPolicy;
|
|
||||||
|
|
||||||
public class MockitoNamingPolicy extends DefaultNamingPolicy {
|
|
||||||
|
|
||||||
diff --git a/src/org/mockito/internal/creation/jmock/ClassImposterizer.java b/src/org/mockito/internal/creation/jmock/ClassImposterizer.java
|
|
||||||
--- a/src/org/mockito/internal/creation/jmock/ClassImposterizer.java
|
|
||||||
+++ b/src/org/mockito/internal/creation/jmock/ClassImposterizer.java
|
|
||||||
@@ -7,8 +7,8 @@
|
|
||||||
import java.lang.reflect.*;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
-import org.mockito.cglib.core.*;
|
|
||||||
-import org.mockito.cglib.proxy.*;
|
|
||||||
+import net.sf.cglib.core.*;
|
|
||||||
+import net.sf.cglib.proxy.*;
|
|
||||||
import org.mockito.exceptions.base.MockitoException;
|
|
||||||
import org.mockito.internal.creation.cglib.MockitoNamingPolicy;
|
|
||||||
import org.objenesis.ObjenesisStd;
|
|
||||||
diff --git a/src/org/mockito/internal/creation/jmock/SerializableNoOp.java b/src/org/mockito/internal/creation/jmock/SerializableNoOp.java
|
|
||||||
--- a/src/org/mockito/internal/creation/jmock/SerializableNoOp.java
|
|
||||||
+++ b/src/org/mockito/internal/creation/jmock/SerializableNoOp.java
|
|
||||||
@@ -6,8 +6,8 @@
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
-import org.mockito.cglib.proxy.Callback;
|
|
||||||
-import org.mockito.cglib.proxy.NoOp;
|
|
||||||
+import net.sf.cglib.proxy.Callback;
|
|
||||||
+import net.sf.cglib.proxy.NoOp;
|
|
||||||
|
|
||||||
public class SerializableNoOp implements NoOp, Serializable {
|
|
||||||
|
|
||||||
diff --git a/src/org/mockito/internal/stubbing/defaultanswers/ReturnsSmartNulls.java b/src/org/mockito/internal/stubbing/defaultanswers/ReturnsSmartNulls.java
|
|
||||||
--- a/src/org/mockito/internal/stubbing/defaultanswers/ReturnsSmartNulls.java
|
|
||||||
+++ b/src/org/mockito/internal/stubbing/defaultanswers/ReturnsSmartNulls.java
|
|
||||||
@@ -9,8 +9,8 @@
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
import org.mockito.Mockito;
|
|
||||||
-import org.mockito.cglib.proxy.MethodInterceptor;
|
|
||||||
-import org.mockito.cglib.proxy.MethodProxy;
|
|
||||||
+import net.sf.cglib.proxy.MethodInterceptor;
|
|
||||||
+import net.sf.cglib.proxy.MethodProxy;
|
|
||||||
import org.mockito.exceptions.Reporter;
|
|
||||||
import org.mockito.internal.creation.jmock.ClassImposterizer;
|
|
||||||
import org.mockito.internal.debugging.Location;
|
|
||||||
diff --git a/src/org/mockito/internal/util/MockUtil.java b/src/org/mockito/internal/util/MockUtil.java
|
|
||||||
--- a/src/org/mockito/internal/util/MockUtil.java
|
|
||||||
+++ b/src/org/mockito/internal/util/MockUtil.java
|
|
||||||
@@ -4,8 +4,8 @@
|
|
||||||
*/
|
|
||||||
package org.mockito.internal.util;
|
|
||||||
|
|
||||||
-import org.mockito.cglib.proxy.Callback;
|
|
||||||
-import org.mockito.cglib.proxy.Factory;
|
|
||||||
+import net.sf.cglib.proxy.Callback;
|
|
||||||
+import net.sf.cglib.proxy.Factory;
|
|
||||||
import org.mockito.exceptions.misusing.NotAMockException;
|
|
||||||
import org.mockito.internal.InvocationNotifierHandler;
|
|
||||||
import org.mockito.internal.MockHandler;
|
|
12
fix-incompatible-types.patch
Normal file
12
fix-incompatible-types.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff --git a/src/org/mockito/internal/creation/instance/ObjenesisInstantiator.java b/src/org/mockito/internal/creation/instance/ObjenesisInstantiator.java
|
||||||
|
index 1ca0003..15172bd 100644
|
||||||
|
--- a/src/org/mockito/internal/creation/instance/ObjenesisInstantiator.java
|
||||||
|
+++ b/src/org/mockito/internal/creation/instance/ObjenesisInstantiator.java
|
||||||
|
@@ -11,6 +11,6 @@ class ObjenesisInstantiator implements Instantiator {
|
||||||
|
private final ObjenesisStd objenesis = new ObjenesisStd(new GlobalConfiguration().enableClassCache());
|
||||||
|
|
||||||
|
public <T> T newInstance(Class<T> cls) {
|
||||||
|
- return objenesis.newInstance(cls);
|
||||||
|
+ return (T) objenesis.newInstance(cls);
|
||||||
|
}
|
||||||
|
}
|
@ -1,23 +1,29 @@
|
|||||||
# HG changeset patch
|
|
||||||
# Parent 5e1ff2ee5aa22b1c22238b520b3e6bd3b4aec0da
|
|
||||||
|
|
||||||
diff --git a/build.xml b/build.xml
|
diff --git a/build.xml b/build.xml
|
||||||
|
index b24eaf0..956cd72 100644
|
||||||
--- a/build.xml
|
--- a/build.xml
|
||||||
+++ b/build.xml
|
+++ b/build.xml
|
||||||
@@ -42,6 +42,12 @@
|
@@ -44,6 +44,12 @@
|
||||||
<property name="maven.repository.dir" value="${basedir}/maven/repository" />
|
<property name="maven.repository.dir" value="${basedir}/maven/repository" />
|
||||||
|
|
||||||
<path id="compile.classpath">
|
<path id="compile.classpath">
|
||||||
+ <fileset dir="/usr/share/java">
|
+ <fileset dir="/usr/share/java">
|
||||||
+ <include name="hamcrest/core.jar" />
|
+ <include name="hamcrest/core.jar" />
|
||||||
+ <include name="junit4.jar" />
|
+ <include name="junit.jar" />
|
||||||
+ <include name="objenesis.jar" />
|
+ <include name="objenesis.jar" />
|
||||||
+ <include name="cglib.jar" />
|
+ <include name="cglib.jar" />
|
||||||
+ </fileset>
|
+ </fileset>
|
||||||
<fileset dir="${lib.dir.run}" includes="*.jar" />
|
<fileset dir="${lib.dir.run}" includes="*.jar" />
|
||||||
<fileset dir="${lib.dir.compile}" includes="*.jar" />
|
<fileset dir="${lib.dir.compile}" includes="*.jar" />
|
||||||
<fileset dir="${lib.dir.repackaged}" includes="*.jar" />
|
<fileset dir="${lib.dir.repackaged}" includes="*.jar" />
|
||||||
@@ -204,19 +210,14 @@
|
@@ -81,6 +87,7 @@
|
||||||
|
<target name="compile" depends="clean, prepare">
|
||||||
|
<javac srcdir="src" destdir="${src.classes.dir}" source="1.5" target="1.5" debug="true" deprecation="true" nowarn="true">
|
||||||
|
<classpath refid="compile.classpath" />
|
||||||
|
+ <compilerarg value="-Xlint:none" />
|
||||||
|
</javac>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
@@ -207,18 +214,14 @@
|
||||||
<delete file="${target.dir}/${jar.core.osgified}" />
|
<delete file="${target.dir}/${jar.core.osgified}" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@ -33,10 +39,64 @@ diff --git a/build.xml b/build.xml
|
|||||||
- <fileset dir="." file="LICENSE" />
|
- <fileset dir="." file="LICENSE" />
|
||||||
- <fileset dir="." file="NOTICE" />
|
- <fileset dir="." file="NOTICE" />
|
||||||
<fileset dir="${src.classes.dir}" />
|
<fileset dir="${src.classes.dir}" />
|
||||||
- <fileset dir="${src.dir}" />
|
|
||||||
- <zipfileset src="${lib.dir.repackaged}/cglib-and-asm-1.0.jar"/>
|
- <zipfileset src="${lib.dir.repackaged}/cglib-and-asm-1.0.jar"/>
|
||||||
- </jarjar>
|
- </jarjar>
|
||||||
+ </jar>
|
+ </jar>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="sources" >
|
<target name="sources" >
|
||||||
|
@@ -319,53 +322,10 @@
|
||||||
|
<h1><a href="org/mockito/Mockito.html">Click to see examples</a>. Mockito ${version} API.</h1>
|
||||||
|
]]>
|
||||||
|
</doctitle>
|
||||||
|
- <header>
|
||||||
|
- <![CDATA[
|
||||||
|
- <!-- Note there is a weird javadoc task bug if using the double quote char \" that causes an 'illegal package name' error -->
|
||||||
|
-
|
||||||
|
- <!-- using the beautify plugin for jQuery from https://bitbucket.org/larscorneliussen/beautyofcode/ -->
|
||||||
|
- <script type="text/javascript">
|
||||||
|
- var shBaseURL = '{@docRoot}/js/sh-2.1.382/';
|
||||||
|
- </script>
|
||||||
|
- <script type="text/javascript" src="{@docRoot}/js/jquery-1.7.min.js"></script>
|
||||||
|
- <script type="text/javascript" src="{@docRoot}/js/jquery.beautyOfCode-min.js"></script>
|
||||||
|
-
|
||||||
|
- <script type="text/javascript">
|
||||||
|
- /* Apply beautification of code */
|
||||||
|
- var usingOldIE = false;
|
||||||
|
- if($.browser.msie && parseInt($.browser.version) < 9) usingOldIE = true;
|
||||||
|
-
|
||||||
|
- if(!usingOldIE) {
|
||||||
|
- $.beautyOfCode.init({
|
||||||
|
- theme : 'Eclipse',
|
||||||
|
- brushes: ['Java']
|
||||||
|
- });
|
||||||
|
-
|
||||||
|
- var version = ${version};
|
||||||
|
-
|
||||||
|
- /* Add name & version to header */
|
||||||
|
- $(function() {
|
||||||
|
- $('td.NavBarCell1[colspan=2]').each(function(index, element) {
|
||||||
|
- var jqueryTD = $(element);
|
||||||
|
- jqueryTD.after(
|
||||||
|
- $('<td><em><strong>Mockito ${version} API</strong></em></td>').attr('class','NavBarCell1').attr('id','mockito-version-header')
|
||||||
|
- );
|
||||||
|
- jqueryTD.removeAttr('colspan');
|
||||||
|
- })
|
||||||
|
- })
|
||||||
|
- }
|
||||||
|
- </script>
|
||||||
|
- ]]>
|
||||||
|
- </header>
|
||||||
|
<group title="Main package" packages="org.mockito"/>
|
||||||
|
<classpath refid="compile.classpath" />
|
||||||
|
</javadoc>
|
||||||
|
- <copy todir="${javadoc.dir}/org/mockito" file="javadoc/img/logo.jpg" />
|
||||||
|
- <copy todir="${javadoc.dir}/js" file="javadoc/js/jquery-1.7.min.js" />
|
||||||
|
- <copy todir="${javadoc.dir}/js" file="javadoc/js/jquery.beautyOfCode-min.js" />
|
||||||
|
- <copy todir="${javadoc.dir}/js/sh-2.1.382">
|
||||||
|
- <fileset dir="javadoc/js/sh-2.1.382"/>
|
||||||
|
- </copy>
|
||||||
|
+ <copy todir="${javadoc.dir}/org/mockito" file="javadoc/org/mockito/logo.jpg" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="repackage-tests" depends="compile.test">
|
||||||
|
10
make-mockito-sourcetarball.sh
Normal file → Executable file
10
make-mockito-sourcetarball.sh
Normal file → Executable file
@ -1,17 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash -ex
|
||||||
#set -x
|
|
||||||
|
|
||||||
VERSION=1.9.0
|
VERSION=1.10.19
|
||||||
SRCDIR=mockito-${VERSION}
|
SRCDIR=mockito-${VERSION}
|
||||||
|
|
||||||
hg clone https://code.google.com/p/mockito/ ${SRCDIR}
|
git clone https://github.com/mockito/mockito.git ${SRCDIR}
|
||||||
pushd $SRCDIR
|
pushd $SRCDIR
|
||||||
hg archive --prefix ${SRCDIR} -t tar -r ${VERSION} ../${SRCDIR}.tar
|
git archive --format=tar --prefix=${SRCDIR}/ v${VERSION} > ../${SRCDIR}.tar
|
||||||
popd
|
popd
|
||||||
|
|
||||||
rm -rf ${SRCDIR}
|
rm -rf ${SRCDIR}
|
||||||
|
|
||||||
tar -xf ${SRCDIR}.tar
|
tar -xf ${SRCDIR}.tar
|
||||||
|
rm ${SRCDIR}.tar
|
||||||
pushd ${SRCDIR}
|
pushd ${SRCDIR}
|
||||||
rm -rf `find -name *.jar` build.gradle cglib-and-asm doc gradle gradlew gradlew.bat
|
rm -rf `find -name *.jar` build.gradle cglib-and-asm doc gradle gradlew gradlew.bat
|
||||||
dos2unix `find -name *.java`
|
dos2unix `find -name *.java`
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
diff --git a/maven/mockito-core.pom b/maven/mockito-core.pom
|
|
||||||
--- a/maven/mockito-core.pom
|
|
||||||
+++ b/maven/mockito-core.pom
|
|
||||||
@@ -29,6 +29,11 @@
|
|
||||||
<artifactId>objenesis</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
</dependency>
|
|
||||||
+ <dependency>
|
|
||||||
+ <groupId>net.sf.cglib</groupId>
|
|
||||||
+ <artifactId>cglib</artifactId>
|
|
||||||
+ <version>2.2</version>
|
|
||||||
+ </dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/mockito-1.9.0/build.xml b/mockito-1.9.0/build.xml
|
|
||||||
index e6b49e8..487b632 100644
|
|
||||||
--- a/mockito-1.9.0/build.xml
|
|
||||||
+++ b/mockito-1.9.0/build.xml
|
|
||||||
@@ -44,7 +44,7 @@
|
|
||||||
<path id="compile.classpath">
|
|
||||||
<fileset dir="/usr/share/java">
|
|
||||||
<include name="hamcrest/core.jar" />
|
|
||||||
- <include name="junit4.jar" />
|
|
||||||
+ <include name="junit.jar" />
|
|
||||||
<include name="objenesis.jar" />
|
|
||||||
<include name="cglib.jar" />
|
|
||||||
</fileset>
|
|
@ -1,10 +1,20 @@
|
|||||||
|
From 02df4868e1614b9fd224e40c1556b78eeb01cd3d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Simacek <msimacek@redhat.com>
|
||||||
|
Date: Wed, 4 Dec 2013 16:52:24 +0100
|
||||||
|
Subject: [PATCH] mockito matcher
|
||||||
|
|
||||||
|
Signed-off-by: Michael Simacek <msimacek@redhat.com>
|
||||||
|
---
|
||||||
|
src/org/mockito/internal/matchers/LocalizedMatcher.java | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/src/org/mockito/internal/matchers/LocalizedMatcher.java b/src/org/mockito/internal/matchers/LocalizedMatcher.java
|
diff --git a/src/org/mockito/internal/matchers/LocalizedMatcher.java b/src/org/mockito/internal/matchers/LocalizedMatcher.java
|
||||||
index 01e83b3..7d249f5 100644
|
index d6dda04..9dffe06 100644
|
||||||
--- a/src/org/mockito/internal/matchers/LocalizedMatcher.java
|
--- a/src/org/mockito/internal/matchers/LocalizedMatcher.java
|
||||||
+++ b/src/org/mockito/internal/matchers/LocalizedMatcher.java
|
+++ b/src/org/mockito/internal/matchers/LocalizedMatcher.java
|
||||||
@@ -16,6 +16,12 @@ public class LocalizedMatcher implements Matcher, ContainsExtraTypeInformation,
|
@@ -22,6 +22,12 @@ public class LocalizedMatcher implements Matcher, ContainsExtraTypeInformation,
|
||||||
private final Matcher actualMatcher;
|
this.location = new LocationImpl();
|
||||||
private Location location;
|
}
|
||||||
|
|
||||||
+ /* This is a hack for Fedora. Bug has been filed here:
|
+ /* This is a hack for Fedora. Bug has been filed here:
|
||||||
+ * https://code.google.com/p/mockito/issues/detail?id=428 */
|
+ * https://code.google.com/p/mockito/issues/detail?id=428 */
|
||||||
@ -12,13 +22,18 @@ index 01e83b3..7d249f5 100644
|
|||||||
+ mismatchDescription.appendText("was ").appendValue(item);
|
+ mismatchDescription.appendText("was ").appendValue(item);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
public LocalizedMatcher(Matcher actualMatcher) {
|
public void _dont_implement_Matcher___instead_extend_BaseMatcher_() {
|
||||||
this.actualMatcher = actualMatcher;
|
// yeah right
|
||||||
this.location = new Location();
|
|
||||||
@@ -65,4 +71,4 @@ public class LocalizedMatcher implements Matcher, ContainsExtraTypeInformation,
|
|
||||||
public Matcher getActualMatcher() {
|
|
||||||
return actualMatcher;
|
|
||||||
}
|
}
|
||||||
-}
|
@@ -37,7 +43,7 @@ public class LocalizedMatcher implements Matcher, ContainsExtraTypeInformation,
|
||||||
\ No newline at end of file
|
public Location getLocation() {
|
||||||
+}
|
return location;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Localized: " + this.actualMatcher;
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
|
31
mockito.spec
31
mockito.spec
@ -1,20 +1,19 @@
|
|||||||
Name: mockito
|
Name: mockito
|
||||||
Version: 1.9.0
|
Version: 1.10.19
|
||||||
Release: 18%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A Java mocking framework
|
Summary: A Java mocking framework
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://code.google.com/p/mockito/
|
URL: http://mockito.org
|
||||||
Source0: mockito-%{version}.tar.xz
|
Source0: mockito-%{version}.tar.xz
|
||||||
Source1: make-mockito-sourcetarball.sh
|
Source1: make-mockito-sourcetarball.sh
|
||||||
Patch0: fixup-ant-script.patch
|
Patch0: fixup-ant-script.patch
|
||||||
Patch1: fix-cglib-refs.patch
|
Patch1: fix-bnd-config.patch
|
||||||
Patch2: maven-cglib-dependency.patch
|
Patch2: %{name}-matcher.patch
|
||||||
Patch3: fix-bnd-config.patch
|
|
||||||
Patch4: %{name}-matcher.patch
|
|
||||||
# Workaround for NPE in setting NamingPolicy in cglib
|
# Workaround for NPE in setting NamingPolicy in cglib
|
||||||
Patch5: setting-naming-policy.patch
|
Patch3: setting-naming-policy.patch
|
||||||
Patch6: mockito-junit4.patch
|
# because we have old objenesis
|
||||||
|
Patch4: fix-incompatible-types.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: jpackage-utils
|
BuildRequires: jpackage-utils
|
||||||
@ -40,7 +39,6 @@ errors.
|
|||||||
|
|
||||||
%package javadoc
|
%package javadoc
|
||||||
Summary: Javadocs for %{name}
|
Summary: Javadocs for %{name}
|
||||||
Group: Documentation
|
|
||||||
Requires: jpackage-utils
|
Requires: jpackage-utils
|
||||||
|
|
||||||
%description javadoc
|
%description javadoc
|
||||||
@ -50,13 +48,15 @@ This package contains the API documentation for %{name}.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
|
||||||
# Set Bundle-Version properly
|
# Set Bundle-Version properly
|
||||||
sed -i 's/Bundle-Version= ${version}/Bundle-Version= %{version}/' conf/mockito-core.bnd
|
sed -i 's/Bundle-Version= ${version}/Bundle-Version= %{version}/' conf/mockito-core.bnd
|
||||||
%patch3
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p2
|
%pom_add_dep net.sf.cglib:cglib maven/mockito-core.pom
|
||||||
|
find . -name "*.java" -exec sed -i "s|org\.mockito\.cglib|net\.sf\.cglib|g" {} +
|
||||||
|
mkdir -p lib/compile
|
||||||
|
|
||||||
%build
|
%build
|
||||||
build-jar-repository lib/compile objenesis
|
build-jar-repository lib/compile objenesis
|
||||||
@ -91,6 +91,9 @@ cp -rp target/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|||||||
%doc NOTICE
|
%doc NOTICE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 29 2015 Michal Srb <msrb@redhat.com> - 1.10.19-1
|
||||||
|
- Update to 1.10.19
|
||||||
|
|
||||||
* Mon Aug 25 2014 Darryl L. Pierce <dpierce@redhat.com> - 1.9.0-18
|
* Mon Aug 25 2014 Darryl L. Pierce <dpierce@redhat.com> - 1.9.0-18
|
||||||
- First build for EPEL7
|
- First build for EPEL7
|
||||||
- Resolves: BZ#1110030
|
- Resolves: BZ#1110030
|
||||||
|
Loading…
Reference in New Issue
Block a user