package old.core;

import java.util.stream.Stream;

import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.ArgumentsProvider;

public class BrowserArgumentProvider implements ArgumentsProvider {

  @Override
  public Stream<? extends Arguments> provideArguments(ExtensionContext context) {
    String browsers = System.getProperty("browsers");

    if ("all".equals(browsers)) {
      return Stream.of(
          Arguments.of(Browser.CHROME),
          Arguments.of(Browser.FIREFOX));
    }

    return Stream.of(
        Arguments.of(Browser.CHROME));
  }
}
