Skip to content

Commit

Permalink
SAK-32594 Upgrade easymock to 3.4 (sakaiproject#4478)
Browse files Browse the repository at this point in the history
* SAK-32594 Upgrade easymock to correct groupId.

All easymock versions are upgraded to at least 2.0.

* SAK-32594 Upgrade easymock to 3.4 

This is an upgrade to the latest version of easymock available.
  • Loading branch information
buckett authored Jun 9, 2017
1 parent 90bbc4d commit 7908335
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 48 deletions.
4 changes: 2 additions & 2 deletions content-review/impl/compilatio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@
</dependency>
<!-- testing dependencies -->
<dependency>
<groupId>easymock</groupId>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>1.2_Java1.3</version>
<version>3.4</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions content-review/impl/turnitin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
</dependency>
<!-- testing dependencies -->
<dependency>
<groupId>easymock</groupId>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>1.2_Java1.3</version>
<version>3.4</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion content-review/impl/urkund/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.3</version>
<version>3.4</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
5 changes: 3 additions & 2 deletions emailtemplateservice/impl/logic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
<groupId>easymock</groupId>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>1.2_Java1.3</version>
<version>3.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
Expand Down
4 changes: 2 additions & 2 deletions hierarchy/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>easymock</groupId>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>1.2_Java1.3</version>
<version>3.4</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions reset-pass/account-validator-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>easymock</groupId>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.0</version>
<version>3.4</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions rwiki/rwiki-impl/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>easymock</groupId>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>1.1</version>
<version>3.4</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions rwiki/rwiki-tool/tool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>easymock</groupId>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>1.1</version>
<version>3.4</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import junit.framework.TestCase;

import org.easymock.MockControl;
import org.easymock.EasyMock;

import uk.ac.cam.caret.sakai.rwiki.service.api.RWikiObjectService;
import uk.ac.cam.caret.sakai.rwiki.service.api.model.RWikiObject;
Expand Down Expand Up @@ -30,7 +30,6 @@ public class RenderBeanTest extends TestCase

RenderBean rb;

MockControl renderServiceControl, objectServiceControl, rwikiObjectControl;

public RenderBeanTest(String test)
{
Expand All @@ -40,25 +39,16 @@ public RenderBeanTest(String test)
protected void setUp() throws Exception
{
super.setUp();
renderServiceControl = MockControl
.createControl(ToolRenderService.class);
objectServiceControl = MockControl
.createControl(RWikiObjectService.class);
rwikiObjectControl = MockControl.createControl(RWikiObject.class);

mockToolRenderService = (ToolRenderService) renderServiceControl
.getMock();
mockObjectService = (RWikiObjectService) objectServiceControl.getMock();
mockObject = (RWikiObject) rwikiObjectControl.getMock();
// mockObject = new RWikiObjectImpl();

mockObjectService.checkUpdate(mockObject);
objectServiceControl.setReturnValue(false);
mockObjectService.checkCreate(mockObject);
objectServiceControl.setReturnValue(false);
mockObjectService.checkRead(mockObject);
objectServiceControl.setReturnValue(false);
objectServiceControl.replay();

mockToolRenderService = EasyMock.mock(ToolRenderService.class);
mockObjectService = EasyMock.mock(RWikiObjectService.class);
mockObject = EasyMock.mock(RWikiObject.class);

EasyMock.expect(mockObjectService.checkUpdate(mockObject)).andReturn(true);
EasyMock.expect(mockObjectService.checkCreate(mockObject)).andReturn(true);
EasyMock.expect(mockObjectService.checkRead(mockObject)).andReturn(true);

EasyMock.replay(mockObjectService);

rb = new RenderBean(mockObject, mockToolRenderService,
mockObjectService, true);
Expand All @@ -71,15 +61,13 @@ protected void setUp() throws Exception
*/
public void testRenderPage()
{
mockToolRenderService.renderPage(mockObject);
renderServiceControl.setReturnValue(value);
rwikiObjectControl.replay();
renderServiceControl.replay();
EasyMock.expect(mockToolRenderService.renderPage(mockObject))
.andReturn(value);

EasyMock.replay(mockToolRenderService, mockObject);

assertTrue(value.equals(rb.renderPage()));
objectServiceControl.verify();
renderServiceControl.verify();
rwikiObjectControl.verify();
EasyMock.verify(mockToolRenderService, mockObject);
}

/*
Expand Down
3 changes: 1 addition & 2 deletions search/search-impl/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.4</version>
<type>jar</type>
<version>3.4</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion signup/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<artifactId>commons-validator</artifactId>
</dependency>
<dependency>
<groupId>easymock</groupId>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions signup/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@
<version>${reflectutils.version}</version>
</dependency>
<dependency>
<groupId>easymock</groupId>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>1.2_Java1.3</version>
<version>3.4</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit 7908335

Please sign in to comment.