Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for addTearDown (0.06 sec)

  1. guava-testlib/test/com/google/common/testing/TearDownStackTest.java

        final ThrowingTearDown tearDownOne = new ThrowingTearDown("one");
        stack.addTearDown(tearDownOne);
    
        final ThrowingTearDown tearDownTwo = new ThrowingTearDown("two");
        stack.addTearDown(tearDownTwo);
    
        assertEquals(false, tearDownOne.ran);
        assertEquals(false, tearDownTwo.ran);
    
        try {
          stack.runTearDown();
          fail("runTearDown should have thrown an exception");
        } catch (ClusterException expected) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 21 10:19:29 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. android/guava-testlib/test/com/google/common/testing/TearDownStackTest.java

        final ThrowingTearDown tearDownOne = new ThrowingTearDown("one");
        stack.addTearDown(tearDownOne);
    
        final ThrowingTearDown tearDownTwo = new ThrowingTearDown("two");
        stack.addTearDown(tearDownTwo);
    
        assertEquals(false, tearDownOne.ran);
        assertEquals(false, tearDownTwo.ran);
    
        try {
          stack.runTearDown();
          fail("runTearDown should have thrown an exception");
        } catch (ClusterException expected) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 21 10:19:29 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/testing/TestLogHandler.java

     *
     * <pre>
     *   TestLogHandler handler;
     *
     *   protected void setUp() throws Exception {
     *     super.setUp();
     *     handler = new TestLogHandler();
     *     SomeClass.logger.addHandler(handler);
     *     addTearDown(new TearDown() {
     *       public void tearDown() throws Exception {
     *         SomeClass.logger.removeHandler(handler);
     *       }
     *     });
     *   }
     *
     *   public void test() {
     *     SomeClass.foo();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 21 20:53:25 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/testing/TearDownStack.java

      public TearDownStack() {
        this.suppressThrows = false;
      }
    
      public TearDownStack(boolean suppressThrows) {
        this.suppressThrows = suppressThrows;
      }
    
      @Override
      public final void addTearDown(TearDown tearDown) {
        synchronized (lock) {
          stack.addFirst(checkNotNull(tearDown));
        }
      }
    
      /** Causes teardown to execute. */
      public final void runTearDown() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 21 10:19:29 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/testing/TearDownStack.java

      public TearDownStack() {
        this.suppressThrows = false;
      }
    
      public TearDownStack(boolean suppressThrows) {
        this.suppressThrows = suppressThrows;
      }
    
      @Override
      public final void addTearDown(TearDown tearDown) {
        synchronized (lock) {
          stack.addFirst(checkNotNull(tearDown));
        }
      }
    
      /** Causes teardown to execute. */
      public final void runTearDown() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 21 10:19:29 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/testing/TestLogHandler.java

     *
     * <pre>
     *   TestLogHandler handler;
     *
     *   protected void setUp() throws Exception {
     *     super.setUp();
     *     handler = new TestLogHandler();
     *     SomeClass.logger.addHandler(handler);
     *     addTearDown(new TearDown() {
     *       public void tearDown() throws Exception {
     *         SomeClass.logger.removeHandler(handler);
     *       }
     *     });
     *   }
     *
     *   public void test() {
     *     SomeClass.foo();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 21 20:53:25 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

      private class FakeService extends AbstractExecutionThreadService implements TearDown {
    
        private final ExecutorService executor = Executors.newSingleThreadExecutor();
    
        FakeService() {
          tearDownStack.addTearDown(this);
        }
    
        volatile int startupCalled = 0;
        volatile int shutdownCalled = 0;
        volatile int runCalled = 0;
    
        @Override
        protected void startUp() throws Exception {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

      private class FakeService extends AbstractExecutionThreadService implements TearDown {
    
        private final ExecutorService executor = Executors.newSingleThreadExecutor();
    
        FakeService() {
          tearDownStack.addTearDown(this);
        }
    
        volatile int startupCalled = 0;
        volatile int shutdownCalled = 0;
        volatile int runCalled = 0;
    
        @Override
        protected void startUp() throws Exception {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 12.7K bytes
    - Viewed (0)
Back to top