
com.ecfeed.core.utils.DataSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ecfeed.junit Show documentation
Show all versions of ecfeed.junit Show documentation
An open library used to connect to the ecFeed service. It can be also used as a standalone testing tool. It is integrated with Junit5 and generates a stream of test cases using a selected algorithm (e.g. Cartesian, N-Wise). There are no limitations associated with the off-line version but the user cannot access the on-line computation servers and the model database.
The newest version!
package com.ecfeed.core.utils;
public enum DataSource {
STATIC("static"),
GEN_N_WISE(GeneratorType.N_WISE.toString()),
GEN_CARTESIAN(GeneratorType.CARTESIAN.toString()),
GEN_ADAPTIVE_RANDOM(GeneratorType.ADAPTIVE_RANDOM.toString()),
GEN_RANDOM(GeneratorType.RANDOM.toString());
private final String fDataSource;
DataSource(String dataSource) {
fDataSource = dataSource;
}
@Override
public String toString() {
return fDataSource;
}
public static DataSource parse(String dataSourceStr) {
if (dataSourceStr.equals(STATIC.toString())) {
return STATIC;
}
if (dataSourceStr.equals(GEN_N_WISE.toString())) {
return GEN_N_WISE;
}
if (dataSourceStr.equals(GEN_CARTESIAN.toString())) {
return GEN_CARTESIAN;
}
if (dataSourceStr.equals(GEN_ADAPTIVE_RANDOM.toString())) {
return GEN_ADAPTIVE_RANDOM;
}
if (dataSourceStr.equals(GEN_RANDOM.toString())) {
return GEN_RANDOM;
}
ExceptionHelper.reportRuntimeException("Can not convert string: " + dataSourceStr + " to data source." );
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy