promote synonyms to core apis

This commit is contained in:
Jonathan Shook
2020-04-24 10:47:23 -05:00
parent 8e99b03468
commit ef49cc5320
3 changed files with 4 additions and 4 deletions

View File

@@ -1,22 +0,0 @@
package io.nosqlbench.engine.cli;
import io.nosqlbench.engine.api.util.Synonyms;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class SynonymsTest {
@Test
public void testCanonicalizeText() {
String before = "test yaml ayamlfoo type btype typea targetrate";
StringBuilder sb = new StringBuilder();
String result = Synonyms.canonicalize(before, Synonyms.PARAM_SYNONYMS,
(s, s2) -> sb.append("replaced ").append(s).append(" with ").append(s2).append("\n"));
assertThat(result).isEqualTo("test workload ayamlfoo driver btype typea cyclerate");
assertThat(sb.toString()).isEqualTo("replaced type with driver\n" +
"replaced targetrate with cyclerate\n" +
"replaced yaml with workload\n");
}
}