Package com.mapr.synth.distributions

Examples of com.mapr.synth.distributions.WordGenerator


import static org.junit.Assert.assertTrue;

public class WordGeneratorTest {
    @Test
    public void checkRealWords() {
        WordGenerator words = new WordGenerator("word-frequency-seed", "other-words");
        for (int i = 0; i < 20000; i++) {
            assertFalse(words.getString(i).matches("-[0-9]+"));
        }

        for (int i = 0; i < 1000; i++) {
            String w = words.getString(i + 200000);
            assertTrue(w.matches(".*-[0-9]+"));
        }
    }
View Full Code Here

TOP

Related Classes of com.mapr.synth.distributions.WordGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.