/
DisableAERI.java
47 lines (39 loc) · 1.25 KB
/
DisableAERI.java
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*******************************************************************************
* Copyright (c) 2017 Red Hat, Inc and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat, Inc - initial API and implementation
*******************************************************************************/
package org.eclipse.reddeer.junit.extension.before.test.impl;
import org.eclipse.reddeer.direct.preferences.PreferencesUtil;
import org.eclipse.reddeer.junit.extensionpoint.IBeforeTest;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.TestClass;
/**
* Disable AERI reporting by setting send mode to never
*
* @author rawagner
*
*/
public class DisableAERI implements IBeforeTest {
@Override
public long getPriority() {
return Long.MAX_VALUE;
}
@Override
public void runBeforeTestClass(String config, TestClass testClass) {
PreferencesUtil.setAERISendMode("NEVER");
}
@Override
public void runBeforeTest(String config, Object target, FrameworkMethod method) {
}
@Override
public boolean hasToRun() {
return true;
}
}