Search in sources :

Example 21 with Mockery

use of org.jmock.Mockery in project geode by apache.

the class ServerLauncherTest method setup.

@Before
public void setup() {
    mockContext = new Mockery() {

        {
            setImposteriser(ClassImposteriser.INSTANCE);
            setThreadingPolicy(new Synchroniser());
        }
    };
    DistributedSystem.removeSystem(InternalDistributedSystem.getConnectedInstance());
}
Also used : Synchroniser(org.jmock.lib.concurrent.Synchroniser) Mockery(org.jmock.Mockery) Before(org.junit.Before)

Example 22 with Mockery

use of org.jmock.Mockery in project geode by apache.

the class DescribeDiskStoreFunctionJUnitTest method setup.

@Before
public void setup() {
    mockContext = new Mockery();
    mockContext.setImposteriser(ClassImposteriser.INSTANCE);
    mockContext.setThreadingPolicy(new Synchroniser());
}
Also used : Synchroniser(org.jmock.lib.concurrent.Synchroniser) Mockery(org.jmock.Mockery) Before(org.junit.Before)

Example 23 with Mockery

use of org.jmock.Mockery in project geode by apache.

the class ListIndexFunctionJUnitTest method setup.

@Before
public void setup() {
    mockContext = new Mockery() {

        {
            setImposteriser(ClassImposteriser.INSTANCE);
            setThreadingPolicy(new Synchroniser());
        }
    };
    mockCounter = new AtomicLong(0l);
}
Also used : AtomicLong(java.util.concurrent.atomic.AtomicLong) Synchroniser(org.jmock.lib.concurrent.Synchroniser) Mockery(org.jmock.Mockery) Before(org.junit.Before)

Example 24 with Mockery

use of org.jmock.Mockery in project geode by apache.

the class LoginHandlerInterceptorJUnitTest method setUp.

@Before
public void setUp() {
    mockContext = new Mockery();
    mockContext.setImposteriser(ClassImposteriser.INSTANCE);
    mockContext.setThreadingPolicy(new Synchroniser());
    LoginHandlerInterceptor.getEnvironment().clear();
}
Also used : Synchroniser(org.jmock.lib.concurrent.Synchroniser) Mockery(org.jmock.Mockery) Before(org.junit.Before)

Example 25 with Mockery

use of org.jmock.Mockery in project geode by apache.

the class AutoBalancerJUnitTest method setupMock.

@Before
public void setupMock() {
    mockContext = new Mockery() {

        {
            setImposteriser(ClassImposteriser.INSTANCE);
            setThreadingPolicy(new Synchroniser());
        }
    };
    mockCacheFacade = mockContext.mock(CacheOperationFacade.class);
    mockAuditor = mockContext.mock(OOBAuditor.class);
    mockScheduler = mockContext.mock(AuditScheduler.class);
    mockClock = mockContext.mock(TimeProvider.class);
}
Also used : TimeProvider(org.apache.geode.cache.util.AutoBalancer.TimeProvider) CacheOperationFacade(org.apache.geode.cache.util.AutoBalancer.CacheOperationFacade) SizeBasedOOBAuditor(org.apache.geode.cache.util.AutoBalancer.SizeBasedOOBAuditor) OOBAuditor(org.apache.geode.cache.util.AutoBalancer.OOBAuditor) AuditScheduler(org.apache.geode.cache.util.AutoBalancer.AuditScheduler) Synchroniser(org.jmock.lib.concurrent.Synchroniser) Mockery(org.jmock.Mockery) Before(org.junit.Before)

Aggregations

Mockery (org.jmock.Mockery)32 Before (org.junit.Before)21 Expectations (org.jmock.Expectations)14 Synchroniser (org.jmock.lib.concurrent.Synchroniser)12 HttpServletResponse (javax.servlet.http.HttpServletResponse)4 JUnit4Mockery (org.jmock.integration.junit4.JUnit4Mockery)4 Test (org.junit.Test)4 HttpServletRequest (javax.servlet.http.HttpServletRequest)3 ParameterSetter (com.ibatis.sqlmap.client.extensions.ParameterSetter)2 ResultGetter (com.ibatis.sqlmap.client.extensions.ResultGetter)2 StageDao (com.thoughtworks.go.server.dao.StageDao)2 SystemEnvironment (com.thoughtworks.go.util.SystemEnvironment)2 File (java.io.File)2 ArrayList (java.util.ArrayList)2 Dictionary (java.util.Dictionary)2 HashMap (java.util.HashMap)2 Servlet (javax.servlet.Servlet)2 BundleContext (org.osgi.framework.BundleContext)2 ComponentContext (org.osgi.service.component.ComponentContext)2 JobConfigIdentifier (com.thoughtworks.go.domain.JobConfigIdentifier)1