Package com.google.common.testing


@CheckReturnValue @NullMarked package com.google.common.testing
Testing utilities. This package is a part of the open-source Guava library.
  • Class
    Description
    Automatically runs sanity checks against top level classes in the same package of the test that extends AbstractPackageSanityTests.
    Supplies an arbitrary "default" instance for a wide range of types, often useful in testing utilities.
    Tester that runs automated sanity tests for any given class.
    Tester for equals() and hashCode() methods of a class.
    Tester for Equivalence relationships between groups of objects.
    A Ticker whose value can be advanced programmatically in test.
    Tester to ensure forwarding wrapper works by delegating calls to the corresponding method with the same parameters forwarded and return value forwarded back or exception propagated as is.
    Testing utilities relating to garbage collection finalization.
    A predicate that is expected to return true subsequent to finalization, that is, one of the following actions taken by the garbage collector when performing a full collection in response to System.gc(): invoking the finalize methods of unreachable objects clearing weak references to unreachable referents enqueuing weak references to unreachable referents in their reference queue
    A test utility that verifies that your methods and constructors throw NullPointerException or UnsupportedOperationException whenever null is passed to a parameter whose declaration or type isn't annotated with an annotation with the simple name Nullable, CheckForNull, NullableType, or NullableDecl.
    Visibility of any method or constructor.
    Tests serialization and deserialization of an object, optionally asserting that the resulting object is equal to the original.
    Simple utility for when you want to create a TearDown that may throw an exception but should not fail a test when it does.
    An object that can perform a TearDown.tearDown() operation.
    Any object which can accept registrations of TearDown instances.
    A TearDownStack contains a stack of TearDown instances.
    Tests may use this to intercept messages that are logged by the code under test.