Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed 5 unnecessary stubbings in PerforceBlameCommandTest.java #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,23 @@ public void testBlameSubmittedFile() throws Exception {
// Changelist 3 is present in history

IFileAnnotation line1ChangeList3 = mock(IFileAnnotation.class);
when(line1ChangeList3.getDepotPath()).thenReturn("foo/bar/src/Foo.java");
when(line1ChangeList3.getLower()).thenReturn(3);

IFileAnnotation line2ChangeList3 = mock(IFileAnnotation.class);
when(line2ChangeList3.getDepotPath()).thenReturn("foo/bar/src/Foo.java");
when(line2ChangeList3.getLower()).thenReturn(3);

// Changelist 4 is not present in history but can be fetched from server

IFileAnnotation line3ChangeList4 = mock(IFileAnnotation.class);
when(line3ChangeList4.getDepotPath()).thenReturn("foo/bar/src/Foo.java");
when(line3ChangeList4.getLower()).thenReturn(4);

// Changelist 5 is not present in history nor in server

IFileAnnotation line4ChangeList5 = mock(IFileAnnotation.class);
when(line4ChangeList5.getDepotPath()).thenReturn("foo/bar/src/Foo.java");
when(line4ChangeList5.getLower()).thenReturn(5);

// Put Changlist 4 again to verify we fetch only once from server
IFileAnnotation line5ChangeList4 = mock(IFileAnnotation.class);
when(line5ChangeList4.getDepotPath()).thenReturn("foo/bar/src/Foo.java");
when(line5ChangeList4.getLower()).thenReturn(4);

Map<IFileSpec, List<IFileRevisionData>> result = new HashMap<IFileSpec, List<IFileRevisionData>>();
Expand Down