diff options
author | Vitaly Takmazov | 2017-06-25 15:06:49 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-06-25 15:06:49 +0300 |
commit | 1e29c8830246a17f060654d43d970a00ce94122a (patch) | |
tree | 1f3374cc843f0b8016ea99e1acfa514f77a57544 /juick-rss/src/test/java/com | |
parent | 13d3c5eebeef3442bba6f7934d8cae08e8962f70 (diff) |
commons-lang3 deprecated classes -> commons-text and commons-codec
Diffstat (limited to 'juick-rss/src/test/java/com')
-rw-r--r-- | juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java b/juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java index a9ac848c..5130f2bc 100644 --- a/juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java +++ b/juick-rss/src/test/java/com/juick/rss/tests/RSSTests.java @@ -9,7 +9,7 @@ import com.juick.rss.configuration.RssMvcConfiguration; import com.juick.service.MessagesService; import com.juick.service.TagService; import com.juick.service.UserService; -import org.apache.commons.lang3.RandomStringUtils; +import org.apache.commons.text.RandomStringGenerator; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -80,13 +80,15 @@ public class RSSTests { private User ugnich, freefd; String ugnichName, ugnichPassword, freefdName, freefdPassword; + final static RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange('a', 'z').build(); + private static Message getMessage(final User user, final String messageText) { Message msg = new Message(); msg.setMid(1); msg.setUser(user); - msg.setText(messageText == null ? RandomStringUtils.randomAlphanumeric(24) : messageText); - msg.setTags(Collections.singletonList(new Tag(RandomStringUtils.randomAlphabetic(4)))); + msg.setText(messageText == null ? generator.generate(24) : messageText); + msg.setTags(Collections.singletonList(new Tag(generator.generate(4)))); return msg; } |