- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 20 for addTearDown (0.11 seconds)
-
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();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 2.8K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/TearDownAccepter.java
* * <p>In JUnit4 language, that means as an {@code @After}. * * <p>In JUnit3 language, that means during the {@link junit.framework.TestCase#tearDown()} step. */ void addTearDown(TearDown tearDown);Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Dec 21 14:50:24 GMT 2024 - 1.3K bytes - Click Count (0) -
guava-testlib/src/com/google/common/testing/TearDownAccepter.java
* * <p>In JUnit4 language, that means as an {@code @After}. * * <p>In JUnit3 language, that means during the {@link junit.framework.TestCase#tearDown()} step. */ void addTearDown(TearDown tearDown);Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Dec 21 14:50:24 GMT 2024 - 1.3K bytes - Click Count (0) -
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() { Throwable exception = null;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Oct 01 13:14:50 GMT 2025 - 2.7K bytes - Click Count (0) -
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() { Throwable exception = null;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Oct 01 13:14:50 GMT 2025 - 2.7K bytes - Click Count (0) -
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();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 2.8K bytes - Click Count (0) -
guava-testlib/test/com/google/common/testing/TearDownStackTest.java
stack.addTearDown(tearDownOne); 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 (RuntimeException expected) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 16:11:48 GMT 2026 - 4.5K bytes - Click Count (0) -
android/guava-testlib/test/com/google/common/testing/TearDownStackTest.java
stack.addTearDown(tearDownOne); 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 (RuntimeException expected) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 16:11:48 GMT 2026 - 4.5K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java
Interruptenator interruptingTask = new Interruptenator(Thread.currentThread()); Thread interruptingThread = new Thread(interruptingTask); interruptingThread.start(); tearDownAccepter.addTearDown( () -> { interruptingTask.stopInterrupting(); interruptingThread.interrupt(); joinUninterruptibly(interruptingThread, 2500, MILLISECONDS); Thread.interrupted();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 15:38:30 GMT 2026 - 3.4K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java
@Override protected void setUp() { ExecutorService executor = newSingleThreadExecutor(); tearDownStack.addTearDown(executor::shutdownNow); sleeper = new SleepingRunnable(1000); delayedFuture = executor.submit(sleeper, true); tearDownStack.addTearDown(() -> Thread.interrupted()); } @Override protected void tearDown() { tearDownStack.runTearDown(); } /**
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 8.9K bytes - Click Count (0)