Skip to content

Commit

Permalink
Replace and remove ObjectBox with AtomicReference in InvocationMarker…
Browse files Browse the repository at this point in the history
…Test (mockito#777)
  • Loading branch information
ChristianSchwarz authored and TimvdLippe committed Nov 25, 2016
1 parent b904694 commit c883016
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
package org.mockito.internal.invocation;

import org.junit.Test;
import org.mockito.internal.util.ObjectBox;
import org.mockito.internal.verification.InOrderContextImpl;
import org.mockito.invocation.Invocation;
import org.mockito.invocation.MatchableInvocation;
import org.mockitoutil.TestBase;

import java.util.Arrays;
import java.util.concurrent.atomic.AtomicReference;

import static junit.framework.TestCase.*;

Expand All @@ -35,17 +35,17 @@ public void shouldMarkInvocationAsVerified() {
public void shouldCaptureArguments() {
//given
Invocation i = new InvocationBuilder().toInvocation();
final ObjectBox box = new ObjectBox();
final AtomicReference<Invocation> box = new AtomicReference<Invocation>();
MatchableInvocation c = new InvocationMatcher(i) {
public void captureArgumentsFrom(Invocation i) {
box.put(i);
box.set(i);
}};

//when
InvocationMarker.markVerified(Arrays.asList(i), c);

//then
assertEquals(i, box.getObject());
assertEquals(i, box.get());
}

@Test
Expand Down
19 changes: 0 additions & 19 deletions src/test/java/org/mockito/internal/util/ObjectBox.java

This file was deleted.

0 comments on commit c883016

Please sign in to comment.