Skip to content
Commits on Source (9)
......@@ -2,8 +2,8 @@ language: java
jdk:
- oraclejdk8
- oraclejdk7
- openjdk6
- openjdk7 #oracle not supported anymore
# openjdk6 not supported any more
env:
# Travis has slow VMs?
......
Copyright (c) 2000-2016, jMock.org
Copyright (c) 2000-2017, jMock.org
All rights reserved.
Redistribution and use in source and binary forms, with or without
......
......@@ -37,3 +37,12 @@ Throw some kind of RuntimeException to report programming errors in the
use of the framework. E.g. trying to set up an expectation to return a
result of the wrong type.
Release
=======
mvn versions:set -DoldVersion=2.8.1-SNAPSHOT -DnewVersion=2.8.1 -DgroupId=org.jmock
find . -name pom.xml.versionsBackup -exec rm {} \;
eval $(gpg-agent --daemon --no-grab --write-env-file $HOME/.gpg-agent-info)
export GPG_AGENT_INFO
export GPG_TTY=$(tty)
mvn clean deploy -P release --settings settings.xml -Dgpg.keyname=XXXXXXXX
jmock2 (2.8.4-1) unstable; urgency=medium
* Team upload.
* New upstream release
- Refreshed the patches
* Fixed the test failure with Java 10 (Closes: #906370)
* Standards-Version updated to 4.2.1
* Switch to debhelper level 11
* Use salsa.debian.org Vcs-* URLs
-- Emmanuel Bourg <ebourg@apache.org> Thu, 20 Sep 2018 17:30:45 +0200
jmock2 (2.8.3-2) unstable; urgency=medium
* Team upload.
......
......@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Uploaders: Stephen Nelson <stephen@eccostudio.com>
Build-Depends:
debhelper (>= 10),
debhelper (>= 11),
maven-debian-helper (>= 2.0)
Build-Depends-Indep:
bsh,
......@@ -14,13 +14,14 @@ Build-Depends-Indep:
libasm-java (>= 5.0),
libcglib-java (>= 3.0),
libhamcrest-java (>= 1.3),
libjaxws-api-java,
libmaven-dependency-plugin-java,
libmaven-exec-plugin-java,
libmaven-javadoc-plugin-java,
libobjenesis-java
Standards-Version: 4.0.0
Vcs-Git: https://anonscm.debian.org/git/pkg-java/jmock2.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/jmock2.git
Standards-Version: 4.2.1
Vcs-Git: https://salsa.debian.org/java-team/jmock2.git
Vcs-Browser: https://salsa.debian.org/java-team/jmock2
Homepage: http://www.jmock.org/
Package: libjmock2-java
......
org.apache.maven.plugins maven-gpg-plugin * * * *
org.codehaus.mojo versions-maven-plugin * * * *
org.sonatype.plugins nexus-staging-maven-plugin * * * *
......@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
--- a/jmock/pom.xml
+++ b/jmock/pom.xml
@@ -80,8 +80,11 @@
@@ -77,8 +77,11 @@
<!-- java -cp ~/.m2/repository/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar:~.m2/repository/org/ow2/asm/asm-util/4.1/asm-util-4.1.jar
org.objectweb.asm.util.ASMifier target/classes/org/jmock/Expectations.class
> Xpectations.java -->
......
......@@ -11,10 +11,3 @@ Forwarded: not-needed
@Test
public void mockedTypeFromClassImposteriserThatMakesFinalizePublicDoesntWarnOnFinalize() {
mockery.setImposteriser(ClassImposteriser.INSTANCE);
@@ -122,4 +123,4 @@
return new String(((ByteArrayOutputStream) out).toByteArray());
}
}
-}
\ No newline at end of file
+}
Description: Adds an explicit dependency on JAX-WS since it's no longer provided by the JRE
Author: Emmanuel Bourg <ebourg@apache.org>
Bug: https://github.com/jmock-developers/jmock-library/pull/111
--- a/jmock/pom.xml
+++ b/jmock/pom.xml
@@ -43,6 +43,12 @@
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
</dependency>
+ <dependency>
+ <groupId>javax.xml.ws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ <version>2.3.0</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
01-fix-expectations-creator.patch
02-ignore-failing-tests.patch
03-jaxws-dependency.patch
......@@ -2,6 +2,3 @@
%:
dh $@
get-orig-source:
uscan --download-current-version --force-download --verbose
......@@ -5,14 +5,14 @@
<groupId>org.jmock</groupId>
<artifactId>jmock-example</artifactId>
<version>2.8.3</version>
<version>2.8.4</version>
<packaging>jar</packaging>
<name>jMock Examples</name>
<parent>
<groupId>org.jmock</groupId>
<artifactId>jmock-parent</artifactId>
<version>2.8.3</version>
<version>2.8.4</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>org.jmock</groupId>
<artifactId>jmock-parent</artifactId>
<version>2.8.3</version>
<version>2.8.4</version>
</parent>
<artifactId>jmock-junit3</artifactId>
......
......@@ -8,7 +8,7 @@
<parent>
<groupId>org.jmock</groupId>
<artifactId>jmock-parent</artifactId>
<version>2.8.3</version>
<version>2.8.4</version>
</parent>
<properties>
......
......@@ -8,7 +8,7 @@
<parent>
<groupId>org.jmock</groupId>
<artifactId>jmock-parent</artifactId>
<version>2.8.3</version>
<version>2.8.4</version>
</parent>
<properties>
......
......@@ -9,10 +9,7 @@
<parent>
<groupId>org.jmock</groupId>
<artifactId>jmock-parent</artifactId>
<version>2.8.3</version>
<!-- mvn versions:set -DoldVersion=2.8.1-SNAPSHOT -DnewVersion=2.8.1
-DgroupId=org.jmock -->
<!-- find . -name pom.xml.versionsBackup -exec rm {} \; -->
<version>2.8.4</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -13,6 +13,7 @@ import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
/**
......@@ -24,6 +25,7 @@ import java.util.Set;
*
* @author npryce
* @author smgf
* @author olibye
* @author named by Ivan Moore.
*/
public class Mockery implements SelfDescribing {
......@@ -35,7 +37,7 @@ public class Mockery implements SelfDescribing {
private final Set<String> mockNames = new HashSet<String>();
private final ReturnDefaultValueAction defaultAction = new ReturnDefaultValueAction(imposteriser);
private final List<Invocation> actualInvocations = new ArrayList<Invocation>();
private final InvocationDispatcher dispatcher = new InvocationDispatcher();
private final InvocationDispatcher dispatcher = new InvocationDispatcher(new CopyOnWriteArrayList(), new CopyOnWriteArrayList());
private Error firstError = null;
......
package org.jmock.api;
import org.jmock.internal.InvocationDispatcher;
public interface ThreadingPolicy {
Invokable synchroniseAccessTo(Invokable mockObject);
}
package org.jmock.internal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import org.hamcrest.Description;
import org.hamcrest.SelfDescribing;
import org.jmock.api.Expectation;
import org.jmock.api.ExpectationError;
import org.jmock.api.Invocation;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class InvocationDispatcher implements ExpectationCollector, SelfDescribing {
private List<Expectation> expectations = new ArrayList<Expectation>();
private List<StateMachine> stateMachines = new ArrayList<StateMachine>();
private final Collection<Expectation> expectations;
private final Collection<StateMachine> stateMachines;
public InvocationDispatcher() {
expectations = new ArrayList<Expectation>();
stateMachines = new ArrayList<StateMachine>();
}
public InvocationDispatcher(Collection<Expectation> theExpectations, Collection<StateMachine> theStateMachines) {
expectations = theExpectations;
stateMachines = theStateMachines;
}
public StateMachine newStateMachine(String name) {
StateMachine stateMachine = new StateMachine(name);
......@@ -32,12 +42,15 @@ public class InvocationDispatcher implements ExpectationCollector, SelfDescribin
describe(description, describedWith(expectations, invocation));
}
private Iterable<SelfDescribing> describedWith(List<Expectation> expectations, final Invocation invocation) {
private Iterable<SelfDescribing> describedWith(Iterable<Expectation> expectations, final Invocation invocation) {
final Iterator<Expectation> iterator = expectations.iterator();
return new Iterable<SelfDescribing>() {
public Iterator<SelfDescribing> iterator() {
return new Iterator<SelfDescribing>() {
public boolean hasNext() { return iterator.hasNext(); }
public boolean hasNext() {
return iterator.hasNext();
}
public SelfDescribing next() {
return new SelfDescribing() {
public void describeTo(Description description) {
......@@ -45,7 +58,10 @@ public class InvocationDispatcher implements ExpectationCollector, SelfDescribin
}
};
}
public void remove() { iterator.remove(); }
public void remove() {
iterator.remove();
}
};
}
};
......@@ -56,8 +72,7 @@ public class InvocationDispatcher implements ExpectationCollector, SelfDescribin
description.appendText("no expectations specified: did you...\n" +
" - forget to start an expectation with a cardinality clause?\n" +
" - call a mocked method to specify the parameter of an expectation?");
}
else {
} else {
description.appendList("expectations:\n ", "\n ", "", selfDescribingExpectations);
if (!stateMachines.isEmpty()) {
description.appendList("\nstates:\n ", "\n ", "", stateMachines);
......@@ -65,7 +80,6 @@ public class InvocationDispatcher implements ExpectationCollector, SelfDescribin
}
}
public boolean isSatisfied() {
for (Expectation expectation : expectations) {
if (!expectation.isSatisfied()) {
......