Examples of NullPointerTester


Examples of com.google.common.testing.NullPointerTester

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

  @GwtIncompatible("NullPointerTester")
  public void testStaticNullPointers() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicStaticMethods(CharMatcher.class);
    tester.testAllPublicInstanceMethods(CharMatcher.ANY);
    tester.testAllPublicInstanceMethods(CharMatcher.anyOf("abc"));
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    assertEquals(0, matcher.countIn(""));
  }

  @GwtIncompatible("NullPointerTester")
  private void doTestNull(CharMatcher matcher) throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicInstanceMethods(matcher);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

          func.hashString(input, Charsets.UTF_8).toString());
    }
  }

  public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester()
        .setDefault(HashCode.class, HashCode.fromLong(0));
    tester.testAllPublicStaticMethods(Hashing.class);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    return ImmutableSortedSet.copyOf(elements);
  }

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

Examples of com.google.common.testing.NullPointerTester

      fail();
    } catch (IllegalArgumentException expected) {}
  }

  public void testNullPointers() {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicInstanceMethods(BloomFilter.create(Funnels.unencodedCharsFunnel(), 100));
    tester.testAllPublicStaticMethods(BloomFilter.class);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    }
  }

  public void testNulls() {
    ServiceManager manager = new ServiceManager(Arrays.<Service>asList());
    new NullPointerTester()
        .setDefault(ServiceManager.Listener.class, new RecordingListener())
        .testAllPublicInstanceMethods(manager);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    assertEquals(expectedHash, out.hash());
  }

  public void testChecksForNull() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.testAllPublicInstanceMethods(
        new HashingOutputStream(Hashing.md5(), new ByteArrayOutputStream()));
    tester.testAllPublicStaticMethods(HashingOutputStream.class);
    tester.testAllPublicConstructors(HashingOutputStream.class);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    SerializableTester.reserializeAndAssert(table);
  }

  @GwtIncompatible("reflection")
  public void testNullPointerStatic() {
    new NullPointerTester().testAllPublicStaticMethods(ArrayTable.class);
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    }
  }

  @GwtIncompatible("reflection")
  public void testNulls() {
    new NullPointerTester().testAllPublicInstanceMethods(create());
  }
View Full Code Here

Examples of com.google.common.testing.NullPointerTester

    return concat(strongImplementations(), weakImplementations());
  }

  public void testNull() throws Exception {
    for (Striped<?> striped : allImplementations()) {
      new NullPointerTester().testAllPublicInstanceMethods(striped);
    }
  }
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.