Package com.google.common.testing

Examples of com.google.common.testing.TearDown


    assertTrue(test.testScopeListener instanceof BazService);   
  }

  public void testGbeWithEnvMain() {
    addTearDown(new TearDown() {
      public void tearDown() throws Exception {
        GuiceBerryEnvWithEnvMain.MyGuiceBerryEnvMain.count = 0;
      }
    });
    TestWithGbeWithEnvMain test = TestWithGbeWithEnvMain.createInstance();
View Full Code Here


    @Inject
    private TearDownAccepter tearDownAccepter;

    public void foo() {
      ordered.append("a");
      tearDownAccepter.addTearDown(new TearDown() {
     
        public void tearDown() throws Exception {
          ordered.append("b");
        }
      });
View Full Code Here

        final TearDownAccepter tearDownAccepter) {
     
      return new TestWrapper() {
       
        public void toRunBeforeTest() {
          tearDownAccepter.addTearDown(new TearDown() {
           
            public void tearDown() throws Exception {
              System.out.println("Ending: " + testId);
            }
          });
View Full Code Here

   
    testCaseScaffolding.runBeforeTest();
   
    Assert.assertTrue(universe.currentTestDescriptionThreadLocal.get() != null);
   
    ((MyTest)testDescription.getTestCase()).accepter.addTearDown(new TearDown() {
     
      public void tearDown() throws Exception {
        throw new RuntimeException();
      }
    });
View Full Code Here

      GuiceBerryEnvSelector guiceBerryEnvSelector) {
    final GuiceBerryWrapper setUpAndTearDown =
      GuiceBerry.INSTANCE.buildWrapper(buildTestDescription(testCase, method.getName()),
          guiceBerryEnvSelector);
    setUpAndTearDown.runBeforeTest();
    return new TearDown() {
     
      public void tearDown() throws Exception {
        setUpAndTearDown.runAfterTest();
      }
    };
View Full Code Here

          }
          final IcStrategy.ClientSupport icClientStrategy =
            clientControllerSupportProvider.get();
          final ControllableId<T> controllableId =
            new ControllableId<T>(testIdProvider.get(), key);
          tearDownAccepterProvider.get().addTearDown(new TearDown() {
            public void tearDown() throws Exception {
              icClientStrategy.resetOverride(controllableId);
            }
          });
          icClientStrategy.setOverride(controllableId, override);
View Full Code Here

  public void testDogAsPotm() {
    PetOfTheMonth expected = PetOfTheMonth.DOG;
    PetStoreModuleWithTestIdBasedOverride.override.put(testId, expected);
    // register a tearDown, so that at the end of the test,
    // the override is set to null again
    addTearDown(new TearDown() {
      public void tearDown() {
        PetStoreModuleWithTestIdBasedOverride.override.remove(testId);
      }
    });
    welcomeTestPage.goTo();
View Full Code Here

  public void testCatAsPotm() {
    PetOfTheMonth expected = PetOfTheMonth.CAT;
    PetStoreModuleWithTestIdBasedOverride.override.put(testId, expected);
    // register a tearDown, so that at the end of the test,
    // the override is set to null again
    addTearDown(new TearDown() {
      public void tearDown() {
        PetStoreModuleWithTestIdBasedOverride.override.remove(testId);
      }
    });
    welcomeTestPage.goTo();
View Full Code Here

  public void testDogAsPotm() {
    PetOfTheMonth expected = PetOfTheMonth.DOG;
    PetStoreModuleWithGlobalStaticOverride.override = expected;
    // register a tearDown, so that at the end of the test,
    // the override is set to null again
    addTearDown(new TearDown() {
      public void tearDown() {
        PetStoreModuleWithGlobalStaticOverride.override = null;
      }
    });
    welcomeTestPage.goTo();
View Full Code Here

  public void testCatAsPotm() {
    PetOfTheMonth expected = PetOfTheMonth.CAT;
    PetStoreModuleWithGlobalStaticOverride.override = expected;
    // register a tearDown, so that at the end of the test,
    // the override is set to null again
    addTearDown(new TearDown() {
      public void tearDown() {
        PetStoreModuleWithGlobalStaticOverride.override = null;
      }
    });
    welcomeTestPage.goTo();
View Full Code Here

TOP

Related Classes of com.google.common.testing.TearDown

Copyright © 2018 www.massapicom. 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.