Files
goldenChart/ta4j-master/ta4j-examples/src/test/java/ta4jexamples/strategies/RSI2StrategyTest.java
T
2026-05-23 15:11:48 +09:00

23 lines
624 B
Java

/*
* SPDX-License-Identifier: MIT
*/
package ta4jexamples.strategies;
import org.junit.Test;
import ta4jexamples.charting.display.SwingChartDisplayer;
public class RSI2StrategyTest {
@Test
public void test() {
// Disable chart display during tests to prevent windows from popping up
// This works in both headless and non-headless environments
System.setProperty(SwingChartDisplayer.DISABLE_DISPLAY_PROPERTY, "true");
try {
RSI2Strategy.main(null);
} finally {
System.clearProperty(SwingChartDisplayer.DISABLE_DISPLAY_PROPERTY);
}
}
}