Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 5 of 5 for StringCatcher (0.28 seconds)

  1. guava-tests/test/com/google/common/eventbus/StringCatcher.java

     * <p>For testing fun, also includes a landmine method that EventBus tests are required not
     * to call ({@link #methodWithoutAnnotation(String)}).
     *
     * @author Cliff Biffle
     */
    @NullUnmarked
    public class StringCatcher {
      private final List<String> events = new ArrayList<>();
    
      @Subscribe
      public void hereHaveAString(@Nullable String string) {
        events.add(string);
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 1.4K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/eventbus/StringCatcher.java

     * <p>For testing fun, also includes a landmine method that EventBus tests are required not
     * to call ({@link #methodWithoutAnnotation(String)}).
     *
     * @author Cliff Biffle
     */
    @NullUnmarked
    public class StringCatcher {
      private final List<String> events = new ArrayList<>();
    
      @Subscribe
      public void hereHaveAString(@Nullable String string) {
        events.add(string);
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 1.4K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/eventbus/EventBusTest.java

      }
    
      public void testMissingSubscribe() {
        bus.register(new Object());
      }
    
      public void testUnregister() {
        StringCatcher catcher1 = new StringCatcher();
        StringCatcher catcher2 = new StringCatcher();
        assertThrows(IllegalArgumentException.class, () -> bus.unregister(catcher1));
    
        bus.register(catcher1);
        bus.post(EVENT);
        bus.register(catcher2);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 11.6K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/eventbus/EventBusTest.java

      }
    
      public void testMissingSubscribe() {
        bus.register(new Object());
      }
    
      public void testUnregister() {
        StringCatcher catcher1 = new StringCatcher();
        StringCatcher catcher2 = new StringCatcher();
        assertThrows(IllegalArgumentException.class, () -> bus.unregister(catcher1));
    
        bus.register(catcher1);
        bus.post(EVENT);
        bus.register(catcher2);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 11.6K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/eventbus/AsyncEventBusTest.java

      protected void setUp() throws Exception {
        super.setUp();
        executor = new FakeExecutor();
        bus = new AsyncEventBus(executor);
      }
    
      public void testBasicDistribution() {
        StringCatcher catcher = new StringCatcher();
        bus.register(catcher);
    
        // We post the event, but our Executor will not deliver it until instructed.
        bus.post(EVENT);
    
        List<String> events = catcher.getEvents();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 2.4K bytes
    - Click Count (0)
Back to Top