From 71e40aa4f5d0f19d766e937ec6fa580dc2198f14 Mon Sep 17 00:00:00 2001 From: Grzegorz Piwowarek Date: Sun, 31 Jul 2016 23:14:14 +0200 Subject: [PATCH] Remove duplicated file --- .../baeldung/mocks/jmockit/ReusingTest.java | 57 ------------------- 1 file changed, 57 deletions(-) delete mode 100644 mocks/jmockit/src/main/java/org/baeldung/mocks/jmockit/ReusingTest.java diff --git a/mocks/jmockit/src/main/java/org/baeldung/mocks/jmockit/ReusingTest.java b/mocks/jmockit/src/main/java/org/baeldung/mocks/jmockit/ReusingTest.java deleted file mode 100644 index 729cb30cd2..0000000000 --- a/mocks/jmockit/src/main/java/org/baeldung/mocks/jmockit/ReusingTest.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.baeldung.mocks.jmockit; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; - -import mockit.Expectations; -import mockit.Injectable; -import mockit.Mocked; -import mockit.Tested; -import mockit.Verifications; -import mockit.integration.junit4.JMockit; - -@RunWith(JMockit.class) -public class ReusingTest { - - @Injectable - private Collaborator collaborator; - - @Mocked - private Model model; - - @Tested - private Performer performer; - - @Before - public void setup(){ - new Expectations(){{ - model.getInfo(); result = "foo"; minTimes = 0; - collaborator.collaborate("foo"); result = true; minTimes = 0; - }}; - } - - @Test - public void testWithSetup() { - performer.perform(model); - verifyTrueCalls(1); - } - - protected void verifyTrueCalls(int calls){ - new Verifications(){{ - collaborator.receive(true); times = calls; - }}; - } - - final class TrueCallsVerification extends Verifications{ - public TrueCallsVerification(int calls){ - collaborator.receive(true); times = calls; - } - } - - @Test - public void testWithFinalClass() { - performer.perform(model); - new TrueCallsVerification(1); - } -}