Examples of doSetUp()


Examples of com.google.inject.testing.guiceberry.junit3.GuiceBerryJunit3.doSetUp()

 
  public void testThatTwoTestsWithSameGbeUseTheSameInjector()
      throws ClassNotFoundException {
    NonTdtcForGbeOne testOne = NonTdtcForGbeOne.createInstance();
    GuiceBerryJunit3 guiceBerryJunit3 = instance();
    guiceBerryJunit3.doSetUp(testOne);
   
    Injector injectorOne = currentUniverse.gbeClassToInjectorMap.get(Class.forName(GuiceBerryEnvOne.GUICE_BERRY_ENV_ONE));
    GuiceBerryJunit3.tearDown(testOne);

    AnotherNonTdtcForGbeOne testTwo = AnotherNonTdtcForGbeOne.createInstance();
View Full Code Here

Examples of com.google.inject.testing.guiceberry.junit3.GuiceBerryJunit3.doSetUp()

   
    Injector injectorOne = currentUniverse.gbeClassToInjectorMap.get(Class.forName(GuiceBerryEnvOne.GUICE_BERRY_ENV_ONE));
    GuiceBerryJunit3.tearDown(testOne);

    AnotherNonTdtcForGbeOne testTwo = AnotherNonTdtcForGbeOne.createInstance();
    guiceBerryJunit3.doSetUp(testTwo);
   
    Injector injectorTwo =
      currentUniverse.gbeClassToInjectorMap.get(Class.forName(GuiceBerryEnvOne.GUICE_BERRY_ENV_ONE));

    // "number" is bound to a random, so this will only pass if the injector
View Full Code Here

Examples of com.google.inject.testing.guiceberry.junit3.GuiceBerryJunit3.doSetUp()

  }

  public void testPutTwoInjectorsInMapForTestsThatDeclareDifferentGbes() {
    NonTdtcForGbeOne testOne = NonTdtcForGbeOne.createInstance();
    GuiceBerryJunit3 guiceBerryJunit3 = instance();
    guiceBerryJunit3.doSetUp(testOne);
    GuiceBerryJunit3.tearDown(testOne);
   
    TestWithGbeTwo testTwo = TestWithGbeTwo.createInstance();
    guiceBerryJunit3.doSetUp(testTwo);
  
View Full Code Here

Examples of com.google.inject.testing.guiceberry.junit3.GuiceBerryJunit3.doSetUp()

    GuiceBerryJunit3 guiceBerryJunit3 = instance();
    guiceBerryJunit3.doSetUp(testOne);
    GuiceBerryJunit3.tearDown(testOne);
   
    TestWithGbeTwo testTwo = TestWithGbeTwo.createInstance();
    guiceBerryJunit3.doSetUp(testTwo);
  
    assertEquals(2, currentUniverse.gbeClassToInjectorMap.size());
  }
 
  public void testRemapper() {
View Full Code Here

Examples of com.google.inject.testing.guiceberry.junit3.GuiceBerryJunit3.doSetUp()

  }
  public void testCallingTwoSetupWithNoTearDownBetween() {
    TestWithGbeOne test = TestWithGbeOne.createInstance();
    GuiceBerryJunit3 guiceBerryJunit3 = instance();
    guiceBerryJunit3.doSetUp(test);
    try {
      guiceBerryJunit3.doSetUp(test);
      fail();
    } catch (RuntimeException expected) {}  
  }
View Full Code Here

Examples of com.google.inject.testing.guiceberry.junit3.GuiceBerryJunit3.doSetUp()

  public void testCallingTwoSetupWithNoTearDownBetween() {
    TestWithGbeOne test = TestWithGbeOne.createInstance();
    GuiceBerryJunit3 guiceBerryJunit3 = instance();
    guiceBerryJunit3.doSetUp(test);
    try {
      guiceBerryJunit3.doSetUp(test);
      fail();
    } catch (RuntimeException expected) {}  
  }
 
  public void testAddTearDownToTearDownTestCase() {
View Full Code Here

Examples of com.google.inject.testing.guiceberry.junit3.GuiceBerryJunit3.doSetUp()

  }
 
  public void testMethodTearDownForTestCaseNotCalledAutomatically() {
    NonTdtcForGbeOne testOne = NonTdtcForGbeOne.createInstance();
    GuiceBerryJunit3 guiceBerryJunit3 = instance();
    guiceBerryJunit3.doSetUp(testOne);
    testOne.run();

    TestWithGbeOne testTwo = TestWithGbeOne.createInstance();
    try
      guiceBerryJunit3.doSetUp(testTwo);
View Full Code Here

Examples of com.google.inject.testing.guiceberry.junit3.GuiceBerryJunit3.doSetUp()

    guiceBerryJunit3.doSetUp(testOne);
    testOne.run();

    TestWithGbeOne testTwo = TestWithGbeOne.createInstance();
    try
      guiceBerryJunit3.doSetUp(testTwo);
      fail();
    } catch (RuntimeException expected) {}
  }
  public void testMethodTearDownForTestCaseCalledManually() {
View Full Code Here

Examples of com.google.inject.testing.guiceberry.junit3.GuiceBerryJunit3.doSetUp()

    TestWithGbeOne test = TestWithGbeOne.createInstance();
   
    assertNull(
      currentUniverse.gbeClassToInjectorMap.get(
        Class.forName(GuiceBerryEnvOne.GUICE_BERRY_ENV_ONE)));
    guiceBerryJunit3.doSetUp(test);
    TestScope testScope =
      currentUniverse.gbeClassToInjectorMap.get(
        Class.forName(GuiceBerryEnvOne.GUICE_BERRY_ENV_ONE))
        .getInstance(TestScope.class);
    assertNotNull(testScope);
View Full Code Here

Examples of com.google.inject.testing.guiceberry.junit3.GuiceBerryJunit3.doSetUp()

    GuiceBerryJunit3 guiceBerryJunit3 = instance();
    TestWithGbeOne testOne = TestWithGbeOne.createInstance();
    assertNull(
        getTestScopeForGbe(
            Class.forName(GuiceBerryEnvOne.GUICE_BERRY_ENV_ONE)));
    guiceBerryJunit3.doSetUp(testOne);
    TestScope testScopeOne =
      getTestScopeForGbe(
          Class.forName(GuiceBerryEnvOne.GUICE_BERRY_ENV_ONE));
    assertNotNull(testScopeOne);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.