Ruby's Test::Unit
has a nice assert_matches
method that can be used in unit tests to assert that a regex matches a string.
Is there anything like this in JUnit? Currently, I do this:
assertEquals(true, actual.matches(expectedRegex));
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…