work/workmanager-test/src/main/java/androidx/work/test/WorkManagerTestInitHelper.java
public static void initializeTestWorkManager(@NonNull Context context) {
        SynchronousExecutor synchronousExecutor = new SynchronousExecutor();
        Configuration configuration = new Configuration.Builder()
                .setExecutor(synchronousExecutor)
                .build();
        initializeTestWorkManager(context, configuration);
    }
/**
     * Initializes a test {@link androidx.work.WorkManager} with a {@link SynchronousExecutor}.
     *
     * @param context The application {@link Context}
     */
Initializes a test  androidx.work.WorkManager with a  SynchronousExecutor.
@param context The application  Context
Initializes a test androidx . work . WorkManager with a SynchronousExecutor . @param context The application Context
public static void initializeTestWorkManager(@NonNull Context context) {
        SynchronousExecutor synchronousExecutor = new SynchronousExecutor();
        Configuration configuration = new Configuration.Builder()
                .setExecutor(synchronousExecutor)
                .build();
        initializeTestWorkManager(context, configuration);
    }
public static void initializeTestWorkManager ( @ NonNull Context context ) { SynchronousExecutor synchronousExecutor = new SynchronousExecutor ( ) ; Configuration configuration = new Configuration . Builder ( ) . setExecutor ( synchronousExecutor ) . build ( ) ; initializeTestWorkManager ( context , configuration ) ; }
Initializes a test {@link androidx.work.WorkManager} with a {@link SynchronousExecutor}.
Initializes a test { @link androidx . work . WorkManager } with a { @link SynchronousExecutor } .