Examples of NullPointerTester


Examples of com.google.common.testing.NullPointerTester

    assertEquals(hashmap.toString(), Maps.toStringImpl(hashmap));
  }

  @GwtIncompatible("NullPointerTester")
  public void testNullPointerExceptions() {
    new NullPointerTester().testAllPublicStaticMethods(Maps.class);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    thread.join();
    assertTrue(completed);
  }

  public void testNulls() {
    NullPointerTester npTester = new NullPointerTester();
    npTester.testAllPublicConstructors(ThreadFactoryBuilder.class);
    npTester.testAllPublicStaticMethods(ThreadFactoryBuilder.class);
    npTester.testAllPublicInstanceMethods(builder);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

@GwtCompatible(emulated = true)
public class FluentIterableTest extends TestCase {

  @GwtIncompatible("NullPointerTester")
  public void testNullPointerExceptions() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(FluentIterable.class);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

        .testEquals();
  }

  @GwtIncompatible("reflection")
  public void testNulls() throws Exception {
    new NullPointerTester()
        .setDefault(Class.class, Color.class)
        .setDefault(Iterable.class, EnumSet.allOf(Color.class))
        .testAllPublicStaticMethods(EnumMultiset.class);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    return new TypeToken<T[]>() {}
        .where(new TypeParameter<T>() {}, componentType);
  }

  public <T> void testNulls() {
    new NullPointerTester()
        .testAllPublicStaticMethods(TypeToken.class);
    new NullPointerTester()
        .setDefault(TypeParameter.class, new TypeParameter<T>() {})
        .testAllPublicInstanceMethods(TypeToken.of(String.class));
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    }
  }

  @GwtIncompatible("NullPointerTester")
  public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(Splitter.class);
    tester.testAllPublicInstanceMethods(Splitter.on(','));
    tester.testAllPublicInstanceMethods(Splitter.on(',').trimResults());
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

  }

  // null parameters test

  public void testNullParameters() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    CacheLoader<Object, Object> loader = identityLoader();
    tester.testAllPublicInstanceMethods(makeCache(createCacheBuilder(), loader));
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    assertEquals(2, queue.size());
    assertEquals(1, queue.remainingCapacity());
  }

  public void testNullPointerExceptions() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(EvictingQueue.class);
    tester.testAllPublicConstructors(EvictingQueue.class);
    EvictingQueue<String> queue = EvictingQueue.create(5);
    // The queue must be non-empty so it throws a NPE correctly
    queue.add("one");
    tester.testAllPublicInstanceMethods(queue);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    } catch (UnsupportedOperationException expected) {
    }
  }

  public void testNullPointers() {
    new NullPointerTester().testAllPublicStaticMethods(Throwables.class);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    assertSame(Collections.emptyList(), Shorts.asList(EMPTY));
  }

  @GwtIncompatible("NullPointerTester")
  public void testNulls() {
    new NullPointerTester().testAllPublicStaticMethods(Shorts.class);
  }
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.