forked from chromiumembedded/java-cef
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestSetupContext.java
More file actions
27 lines (21 loc) · 920 Bytes
/
TestSetupContext.java
File metadata and controls
27 lines (21 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (c) 2019 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
package tests.junittests;
import org.junit.jupiter.api.extension.ExtensionContext;
import java.util.Optional;
// Stores global test setup state for access from package classes.
class TestSetupContext {
private static boolean debugPrint_ = false;
// Debug print statements may be enabled via `--config debugPrint=true`.
static boolean debugPrint() {
return debugPrint_;
}
// Initialize from global configuration parameters.
static void initialize(ExtensionContext context) {
Optional<String> debugPrint = context.getConfigurationParameter("debugPrint");
if (debugPrint.isPresent() && debugPrint.get().equalsIgnoreCase("true")) {
debugPrint_ = true;
}
}
}