Skip to content
Snippets Groups Projects
Commit 622484ce authored by Andrea Burattin's avatar Andrea Burattin
Browse files

Added missing string test source class

parent 4dd3cfc1
No related branches found
No related tags found
No related merge requests found
package beamline.sources;
import beamline.events.BEvent;
public class StringTestSource extends BeamlineAbstractSource {
private static final long serialVersionUID = 7657971352128040279L;
private String[] traces;
public StringTestSource(String...traces) {
this.traces = traces;
}
@Override
public void run(SourceContext<BEvent> ctx) throws Exception {
for (int j = 0; j < traces.length; j++) {
for (int i = 0; i < traces[j].length(); i++) {
ctx.collect(BEvent.create("test-process", traces[j].substring(i, i+1), "case-"+j));
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment