Skip to content

Commit

Permalink
Upgrading mockito
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Nov 11, 2017
1 parent ca85b81 commit 15cb9fc
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 26 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions java/client/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<classpathentry kind="lib" path="/third-party/java/websocket/websocket-common-9.4.5.v20170502.jar" sourcepath="/third-party/java/websocket/websocket-common-9.4.5.v20170502-sources.jar"/>
<classpathentry kind="lib" path="/third-party/java/netty/netty-all-4.1.14.Final.jar"/>
<classpathentry kind="lib" path="/third-party/java/xml-apis/xml-apis-1.4.01.jar"/>
<classpathentry kind="lib" path="/third-party/java/mockito/mockito-core-1.9.5.jar"/>
<classpathentry kind="lib" path="/third-party/java/objenesis/objenesis-1.0.jar"/>
<classpathentry kind="lib" path="/third-party/java/mockito/mockito-core-2.12.0.jar"/>
<classpathentry kind="lib" path="/third-party/java/objenesis/objenesis-2.6.jar"/>
<classpathentry kind="lib" path="/third-party/java/slf4j/slf4j-api-1.6.6.jar"/>
<classpathentry kind="lib" path="/third-party/java/slf4j/slf4j-jdk14-1.6.6.jar"/>
<classpathentry kind="lib" path="/third-party/java/gson/gson-2.8.2.jar"/>
Expand Down
4 changes: 2 additions & 2 deletions java/client/client.iml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
<orderEntry type="library" name="jetty" level="project" />
<orderEntry type="library" scope="TEST" name="little_proxy" level="project" />
<orderEntry type="library" scope="TEST" name="slf4j" level="project" />
<orderEntry type="library" name="mockito-core-1.9.5-srcs" level="project" />
<orderEntry type="library" name="objenesis-1.0" level="project" />
<orderEntry type="library" name="mockito-core" level="project" />
<orderEntry type="library" name="objenesis" level="project" />
<orderEntry type="library" name="commons-httpclient" level="project" />
<orderEntry type="library" scope="TEST" name="websocket" level="project" />
<orderEntry type="library" scope="TEST" name="jetty-util" level="project" />
Expand Down
2 changes: 1 addition & 1 deletion java/server/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<classpathentry kind="lib" path="/third-party/java/jcip_annotations/jcip-annotations-1.0.jar" sourcepath="/third-party/java/jcip_annotations/jcip-annotations-1.0-sources.jar"/>
<classpathentry kind="lib" path="/third-party/java/netty/netty-all-4.1.14.Final.jar"/>
<classpathentry kind="lib" path="/third-party/java/guava/guava-23.0.jar" sourcepath="/third-party/java/guava/guava-23.0-sources.jar"/>
<classpathentry kind="lib" path="/third-party/java/mockito/mockito-core-1.9.5.jar"/>
<classpathentry kind="lib" path="/third-party/java/mockito/mockito-core-2.12.0.jar"/>
<classpathentry kind="lib" path="/third-party/java/jetty/jetty-repacked.jar"/>
<classpathentry kind="lib" path="/third-party/java/yaml/snakeyaml-1.15.jar" sourcepath="/third-party/java/yaml/snakeyaml-1.15-sources.jar"/>
<classpathentry kind="lib" path="/third-party/java/beust/jcommander-1.48.jar"/>
Expand Down
4 changes: 2 additions & 2 deletions java/server/server.iml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<orderEntry type="library" name="servlet-api" level="project" />
<orderEntry type="library" name="snakeyaml" level="project" />
<orderEntry type="library" scope="TEST" name="hamcrest" level="project" />
<orderEntry type="library" name="mockito-core-1.9.5-srcs" level="project" />
<orderEntry type="library" name="objenesis-1.0" level="project" />
<orderEntry type="library" name="mockito-core" level="project" />
<orderEntry type="library" name="objenesis" level="project" />
<orderEntry type="library" name="commons-httpclient" level="project" />
</component>
<component name="sonarModuleSettings">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.stub;
import static org.mockito.Mockito.when;

import com.google.common.base.Charsets;
import com.google.common.collect.ImmutableMap;
Expand All @@ -31,8 +31,6 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.io.TemporaryFilesystem;
import org.openqa.selenium.io.Zip;
Expand All @@ -50,7 +48,6 @@
import java.io.IOException;
import java.util.Map;

@RunWith(JUnit4.class)
public class UploadFileTest {

private TemporaryFilesystem tempFs;
Expand All @@ -71,9 +68,9 @@ public void cleanUp() {
@Test
public void shouldWriteABase64EncodedZippedFileToDiskAndKeepName() throws Exception {
ActiveSession session = mock(ActiveSession.class);
stub(session.getId()).toReturn(new SessionId("1234567"));
stub(session.getFileSystem()).toReturn(tempFs);
stub(session.getDownstreamDialect()).toReturn(Dialect.OSS);
when(session.getId()).thenReturn(new SessionId("1234567"));
when(session.getFileSystem()).thenReturn(tempFs);
when(session.getDownstreamDialect()).thenReturn(Dialect.OSS);

File tempFile = touch(null, "foo");
String encoded = Zip.zip(tempFile);
Expand All @@ -96,9 +93,9 @@ public void shouldWriteABase64EncodedZippedFileToDiskAndKeepName() throws Except
@Test
public void shouldThrowAnExceptionIfMoreThanOneFileIsSent() throws Exception {
ActiveSession session = mock(ActiveSession.class);
stub(session.getId()).toReturn(new SessionId("1234567"));
stub(session.getFileSystem()).toReturn(tempFs);
stub(session.getDownstreamDialect()).toReturn(Dialect.OSS);
when(session.getId()).thenReturn(new SessionId("1234567"));
when(session.getFileSystem()).thenReturn(tempFs);
when(session.getDownstreamDialect()).thenReturn(Dialect.OSS);

File baseDir = Files.createTempDir();
touch(baseDir, "example");
Expand Down
4 changes: 2 additions & 2 deletions third_party/java/mockito/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ java_library(
)

prebuilt_jar(name = 'core',
binary_jar = 'mockito-core-1.9.5.jar',
source_jar = 'mockito-core-1.9.5-srcs.jar',
binary_jar = 'mockito-core-2.12.0.jar',
source_jar = 'mockito-core-2.12.0-sources.jar',
)
Binary file not shown.
Binary file removed third_party/java/mockito/mockito-core-1.9.5.jar
Binary file not shown.
Binary file not shown.
Binary file added third_party/java/mockito/mockito-core-2.12.0.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions third_party/java/objenesis/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# BUILD FILE SYNTAX: SKYLARK
prebuilt_jar(name = 'objenesis',
binary_jar = 'objenesis-1.0.jar',
binary_jar = 'objenesis-2.6.jar',
visibility = [
'//third_party/java/...',
'//third_party/java/mockito:mockito',
],
)

Binary file removed third_party/java/objenesis/objenesis-1.0.jar
Binary file not shown.
Binary file added third_party/java/objenesis/objenesis-2.6.jar
Binary file not shown.

0 comments on commit 15cb9fc

Please sign in to comment.