Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
com.google.protobuf.ExtensionRegistryFactoryTest Class Reference
Inheritance diagram for com.google.protobuf.ExtensionRegistryFactoryTest:
Inheritance graph
[legend]

Classes

class  InnerLiteTest
 
class  InnerTest
 
interface  RegistryTests
 

Public Member Functions

void runTest () throws Exception
 

Static Public Member Functions

static Test suite ()
 

Private Member Functions

void runTestMethod (ClassLoader classLoader, Class<? extends RegistryTests > testClass) throws Exception
 

Static Private Member Functions

static ClassLoader getLiteOnlyClassLoader ()
 

Static Private Attributes

static final ClassLoader LITE_CLASS_LOADER = getLiteOnlyClassLoader()
 

Detailed Description

Tests for ExtensionRegistryFactory and the ExtensionRegistry instances it creates.

This test simulates the runtime behaviour of the ExtensionRegistryFactory by delegating test definitions to two inner classes InnerTest and InnerLiteTest, the latter of which is executed using a custom ClassLoader, simulating the ProtoLite environment.

The test mechanism employed here is based on the pattern in

com.google.common.util.concurrent.AbstractFutureFallbackAtomicHelperTest

Definition at line 56 of file ExtensionRegistryFactoryTest.java.

Member Function Documentation

◆ getLiteOnlyClassLoader()

static ClassLoader com.google.protobuf.ExtensionRegistryFactoryTest.getLiteOnlyClassLoader ( )
inlinestaticprivate

Constructs a custom ClassLoader blacklisting the classes which are inspected in the SUT to determine the Lite/non-Lite runtime.

Definition at line 247 of file ExtensionRegistryFactoryTest.java.

◆ runTest()

void com.google.protobuf.ExtensionRegistryFactoryTest.runTest ( ) throws Exception
inline

Sequentially runs first the Lite and then the non-Lite test variant via classloader manipulation.

Definition at line 220 of file ExtensionRegistryFactoryTest.java.

◆ runTestMethod()

void com.google.protobuf.ExtensionRegistryFactoryTest.runTestMethod ( ClassLoader  classLoader,
Class<? extends RegistryTests >  testClass 
) throws Exception
inlineprivate

Definition at line 235 of file ExtensionRegistryFactoryTest.java.

◆ suite()

static Test com.google.protobuf.ExtensionRegistryFactoryTest.suite ( )
inlinestatic

Defines a suite of tests which the JUnit3 runner retrieves by reflection.

Definition at line 207 of file ExtensionRegistryFactoryTest.java.

Member Data Documentation

◆ LITE_CLASS_LOADER

final ClassLoader com.google.protobuf.ExtensionRegistryFactoryTest.LITE_CLASS_LOADER = getLiteOnlyClassLoader()
staticprivate

Definition at line 59 of file ExtensionRegistryFactoryTest.java.


The documentation for this class was generated from the following file:
com.google
com


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:07