This is an automated email from the ASF dual-hosted git repository. rcordier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 3cdf32467b5014e7daf57acd24196dc008b71add Author: Jan-Eric Hellenberg <janeric.hellenb...@gmail.com> AuthorDate: Fri Jan 3 14:57:34 2025 +0100 James-4099 Properly indent PrefixedRegex tests --- .../mailbox/model/search/PrefixedRegexTest.java | 1420 ++++++++++---------- 1 file changed, 710 insertions(+), 710 deletions(-) diff --git a/mailbox/api/src/test/java/org/apache/james/mailbox/model/search/PrefixedRegexTest.java b/mailbox/api/src/test/java/org/apache/james/mailbox/model/search/PrefixedRegexTest.java index 644bad44be..d72becf65a 100644 --- a/mailbox/api/src/test/java/org/apache/james/mailbox/model/search/PrefixedRegexTest.java +++ b/mailbox/api/src/test/java/org/apache/james/mailbox/model/search/PrefixedRegexTest.java @@ -51,1061 +51,1061 @@ class PrefixedRegexTest { } abstract static class TestBase extends MailboxFolderDelimiterAwareTest { - private static final String PREFIX = "name"; - private static final String EMPTY_PREFIX = ""; - - @Test - public void shouldMatchBeanContract() { - EqualsVerifier.forClass(PrefixedRegex.class) - .withIgnoredFields("pattern") - .withPrefabValues(Pattern.class, Pattern.compile("a"), Pattern.compile("b")) - .verify(); - } + private static final String PREFIX = "name"; + private static final String EMPTY_PREFIX = ""; + + @Test + public void shouldMatchBeanContract() { + EqualsVerifier.forClass(PrefixedRegex.class) + .withIgnoredFields("pattern") + .withPrefabValues(Pattern.class, Pattern.compile("a"), Pattern.compile("b")) + .verify(); + } - @Test - void slowRegexShouldNotBeConstructedByFuzzing() throws Exception { - ExecutorService executorService = Executors.newSingleThreadExecutor(); + @Test + void slowRegexShouldNotBeConstructedByFuzzing() throws Exception { + ExecutorService executorService = Executors.newSingleThreadExecutor(); - try { - executorService.submit(() -> { - PrefixedRegex prefixedRegex = new PrefixedRegex("", "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%a", folderDelimiter()); + try { + executorService.submit(() -> { + PrefixedRegex prefixedRegex = new PrefixedRegex("", "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%a", folderDelimiter()); - prefixedRegex.isExpressionMatch("aa%%%%%%%%%%%%%%%%"); - }).get(30, TimeUnit.SECONDS); - } finally { - executorService.shutdownNow(); + prefixedRegex.isExpressionMatch("aa%%%%%%%%%%%%%%%%"); + }).get(30, TimeUnit.SECONDS); + } finally { + executorService.shutdownNow(); + } } - } - @Test - void isWildShouldReturnTrueWhenOnlyFreeWildcard() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "*", folderDelimiter()); + @Test + void isWildShouldReturnTrueWhenOnlyFreeWildcard() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "*", folderDelimiter()); - boolean actual = prefixedRegex.isWild(); + boolean actual = prefixedRegex.isWild(); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isWildShouldReturnTrueWhenOnlyLocalWildcard() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "%", folderDelimiter()); + @Test + void isWildShouldReturnTrueWhenOnlyLocalWildcard() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "%", folderDelimiter()); - boolean actual = prefixedRegex.isWild(); + boolean actual = prefixedRegex.isWild(); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isWildShouldReturnTrueWhenFreeWildcardAtBeginning() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "*One", folderDelimiter()); + @Test + void isWildShouldReturnTrueWhenFreeWildcardAtBeginning() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "*One", folderDelimiter()); - boolean actual = prefixedRegex.isWild(); + boolean actual = prefixedRegex.isWild(); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isWildShouldReturnTrueWhenLocalWildcardAtBeginning() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "%One", folderDelimiter()); + @Test + void isWildShouldReturnTrueWhenLocalWildcardAtBeginning() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "%One", folderDelimiter()); - boolean actual = prefixedRegex.isWild(); + boolean actual = prefixedRegex.isWild(); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isWildShouldReturnTrueWhenFreeWildcardInMiddle() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "A*A", folderDelimiter()); + @Test + void isWildShouldReturnTrueWhenFreeWildcardInMiddle() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "A*A", folderDelimiter()); - boolean actual = prefixedRegex.isWild(); + boolean actual = prefixedRegex.isWild(); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isWildShouldReturnTrueWhenLocalWildcardInMiddle() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "A%A", folderDelimiter()); + @Test + void isWildShouldReturnTrueWhenLocalWildcardInMiddle() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "A%A", folderDelimiter()); - boolean actual = prefixedRegex.isWild(); + boolean actual = prefixedRegex.isWild(); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isWildShouldReturnTrueWhenFreeWildcardAtEnd() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "One*", folderDelimiter()); + @Test + void isWildShouldReturnTrueWhenFreeWildcardAtEnd() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "One*", folderDelimiter()); - boolean actual = prefixedRegex.isWild(); + boolean actual = prefixedRegex.isWild(); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isWildShouldReturnTrueWhenLocalWildcardAtEnd() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "One%", folderDelimiter()); + @Test + void isWildShouldReturnTrueWhenLocalWildcardAtEnd() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "One%", folderDelimiter()); - boolean actual = prefixedRegex.isWild(); + boolean actual = prefixedRegex.isWild(); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isWildShouldReturnFalseWhenEmptyExpression() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "", folderDelimiter()); + @Test + void isWildShouldReturnFalseWhenEmptyExpression() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "", folderDelimiter()); - boolean actual = prefixedRegex.isWild(); + boolean actual = prefixedRegex.isWild(); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isWildShouldReturnFalseWhenNullExpression() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, null, folderDelimiter()); + @Test + void isWildShouldReturnFalseWhenNullExpression() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, null, folderDelimiter()); - boolean actual = prefixedRegex.isWild(); + boolean actual = prefixedRegex.isWild(); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isWildShouldReturnFalseWhenNoWildcard() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "ONE", folderDelimiter()); + @Test + void isWildShouldReturnFalseWhenNoWildcard() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "ONE", folderDelimiter()); - boolean actual = prefixedRegex.isWild(); + boolean actual = prefixedRegex.isWild(); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void getCombinedNameShouldWork() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "mailbox", folderDelimiter()); + @Test + void getCombinedNameShouldWork() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "mailbox", folderDelimiter()); - String actual = prefixedRegex.getCombinedName(); + String actual = prefixedRegex.getCombinedName(); - assertThat(actual).isEqualTo(adjustToActiveFolderDelimiter("name.mailbox")); - } + assertThat(actual).isEqualTo(adjustToActiveFolderDelimiter("name.mailbox")); + } - @Test - void getCombinedNameShouldWorkWhenEmptyExpression() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "", folderDelimiter()); + @Test + void getCombinedNameShouldWorkWhenEmptyExpression() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, "", folderDelimiter()); - String actual = prefixedRegex.getCombinedName(); + String actual = prefixedRegex.getCombinedName(); - assertThat(actual).isEqualTo("name"); - } + assertThat(actual).isEqualTo("name"); + } - @Test - void getCombinedNameShouldReturnEmptyStringWhenNullMailboxPathAndExpression() { - String prefix = null; - String regex = null; - PrefixedRegex prefixedRegex = new PrefixedRegex(prefix, regex, folderDelimiter()); + @Test + void getCombinedNameShouldReturnEmptyStringWhenNullMailboxPathAndExpression() { + String prefix = null; + String regex = null; + PrefixedRegex prefixedRegex = new PrefixedRegex(prefix, regex, folderDelimiter()); - String actual = prefixedRegex.getCombinedName(); + String actual = prefixedRegex.getCombinedName(); - assertThat(actual).isEmpty(); - } + assertThat(actual).isEmpty(); + } - @Test - void getCombinedNameShouldIgnoreDelimiterWhenPresentAtBeginningOfExpression() { - PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, adjustToActiveFolderDelimiter(".mailbox"), folderDelimiter()); + @Test + void getCombinedNameShouldIgnoreDelimiterWhenPresentAtBeginningOfExpression() { + PrefixedRegex prefixedRegex = new PrefixedRegex(PREFIX, adjustToActiveFolderDelimiter(".mailbox"), folderDelimiter()); - String actual = prefixedRegex.getCombinedName(); + String actual = prefixedRegex.getCombinedName(); - assertThat(actual).isEqualTo(adjustToActiveFolderDelimiter("name.mailbox")); - } + assertThat(actual).isEqualTo(adjustToActiveFolderDelimiter("name.mailbox")); + } - @Test - void getCombinedNameShouldIgnoreDelimiterWhenPresentAtEndOfMailboxName() { - PrefixedRegex prefixedRegex = new PrefixedRegex( - PREFIX + adjustToActiveFolderDelimiter("."), - adjustToActiveFolderDelimiter(".mailbox"), - folderDelimiter()); + @Test + void getCombinedNameShouldIgnoreDelimiterWhenPresentAtEndOfMailboxName() { + PrefixedRegex prefixedRegex = new PrefixedRegex( + PREFIX + adjustToActiveFolderDelimiter("."), + adjustToActiveFolderDelimiter(".mailbox"), + folderDelimiter()); - String actual = prefixedRegex.getCombinedName(); + String actual = prefixedRegex.getCombinedName(); - assertThat(actual).isEqualTo(adjustToActiveFolderDelimiter("name.mailbox")); - } + assertThat(actual).isEqualTo(adjustToActiveFolderDelimiter("name.mailbox")); + } - @Test - void isExpressionMatchShouldReturnFalseWhenNullExpression() { - PrefixedRegex testee = new PrefixedRegex(PREFIX, null, folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenNullExpression() { + PrefixedRegex testee = new PrefixedRegex(PREFIX, null, folderDelimiter()); - boolean actual = testee.isExpressionMatch("folder"); + boolean actual = testee.isExpressionMatch("folder"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenMatching() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenMatching() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailbox"); + boolean actual = testee.isExpressionMatch("mailbox"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnTrueWhenNameBeginsWithDelimiter() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnTrueWhenNameBeginsWithDelimiter() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter(".mailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter(".mailbox")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenNameEndsWithDelimiter() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenNameEndsWithDelimiter() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchFolderWhenNoMatching() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchFolderWhenNoMatching() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("sub"); + boolean actual = testee.isExpressionMatch("sub"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchFolderWithExpandedEndName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchFolderWithExpandedEndName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailbox123"); + boolean actual = testee.isExpressionMatch("mailbox123"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchSubFolder() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchSubFolder() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.123")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.123")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldReturnTrueWhenEmptyNameAndExpression() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnTrueWhenEmptyNameAndExpression() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "", folderDelimiter()); - boolean actual = testee.isExpressionMatch(""); + boolean actual = testee.isExpressionMatch(""); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenEmptyExpressionAndNameBeginsWithDelimiter() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenEmptyExpressionAndNameBeginsWithDelimiter() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter(".123")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter(".123")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchFolderWhenEmptyExpression() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchFolderWhenEmptyExpression() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "", folderDelimiter()); - boolean actual = testee.isExpressionMatch("folder"); + boolean actual = testee.isExpressionMatch("folder"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldReturnTrueWhenEmptyNameAndOnlyLocalWildcard() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnTrueWhenEmptyNameAndOnlyLocalWildcard() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%", folderDelimiter()); - boolean actual = testee.isExpressionMatch(""); + boolean actual = testee.isExpressionMatch(""); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnTrueWhenOnlyLocalWildcard() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnTrueWhenOnlyLocalWildcard() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%", folderDelimiter()); - boolean actual = testee.isExpressionMatch("folder"); + boolean actual = testee.isExpressionMatch("folder"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldNotMatchSubFolderWhenOnlyLocalWildcard() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchSubFolderWhenOnlyLocalWildcard() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.sub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.sub")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldReturnTrueWhenEmptyNameAndOnlyFreeWildcard() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnTrueWhenEmptyNameAndOnlyFreeWildcard() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*", folderDelimiter()); - boolean actual = testee.isExpressionMatch(""); + boolean actual = testee.isExpressionMatch(""); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenOnlyFreeWildcard() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenOnlyFreeWildcard() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*", folderDelimiter()); - boolean actual = testee.isExpressionMatch("sub"); + boolean actual = testee.isExpressionMatch("sub"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchSubFolderWhenOnlyFreeWildcard() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchSubFolderWhenOnlyFreeWildcard() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.sub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.sub")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenEmptyNameAndLocalWildcardAtEnd() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox%", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenEmptyNameAndLocalWildcardAtEnd() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox%", folderDelimiter()); - boolean actual = testee.isExpressionMatch(""); + boolean actual = testee.isExpressionMatch(""); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenLocalWildcardAtEndAndNoMatching() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox%", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenLocalWildcardAtEndAndNoMatching() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox%", folderDelimiter()); - boolean actual = testee.isExpressionMatch("sub"); + boolean actual = testee.isExpressionMatch("sub"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenLocalWildcardAtEndNotUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox%", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenLocalWildcardAtEndNotUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox%", folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailbox"); + boolean actual = testee.isExpressionMatch("mailbox"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnTrueWhenLocalWildcardAtEndUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox%", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnTrueWhenLocalWildcardAtEndUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox%", folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailboxsub"); + boolean actual = testee.isExpressionMatch("mailboxsub"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldNotMatchSubFolderWhenLocalWildcardAtEnd() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox%", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchSubFolderWhenLocalWildcardAtEnd() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox%", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.sub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.sub")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenEmptyNameAndLocalWildcardAtBeginning() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenEmptyNameAndLocalWildcardAtBeginning() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(""); + boolean actual = testee.isExpressionMatch(""); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchFolderWhenLocalWildcardAtBeginningAndNoMatching() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchFolderWhenLocalWildcardAtBeginningAndNoMatching() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("sub"); + boolean actual = testee.isExpressionMatch("sub"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenLocalWildcardAtBeginningNotUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenLocalWildcardAtBeginningNotUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailbox"); + boolean actual = testee.isExpressionMatch("mailbox"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenLocalWildcardAtBeginningUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenLocalWildcardAtBeginningUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("submailbox"); + boolean actual = testee.isExpressionMatch("submailbox"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldNotMatchSubFolderWhenLocalWildcardAtBeginning() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchSubFolderWhenLocalWildcardAtBeginning() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenLocalWildcardAtBeginning() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenLocalWildcardAtBeginning() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox.sub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox.sub")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenEmptyNameAndLocalWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenEmptyNameAndLocalWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(""); + boolean actual = testee.isExpressionMatch(""); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenLocalWildcardInMiddleAndMissingEndName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenLocalWildcardInMiddleAndMissingEndName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("sub"); + boolean actual = testee.isExpressionMatch("sub"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenLocalWildcardInMiddleAndMatching() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenLocalWildcardInMiddleAndMatching() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("submailbox"); + boolean actual = testee.isExpressionMatch("submailbox"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenLocalWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenLocalWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("sub123mailbox"); + boolean actual = testee.isExpressionMatch("sub123mailbox"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldNotMatchSubFolderWhenLocalWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchSubFolderWhenLocalWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchSubFolderWhenLocalWildcardInMiddleAndExpandedMiddleName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchSubFolderWhenLocalWildcardInMiddleAndExpandedMiddleName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.123mailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.123mailbox")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenLocalWildcardInMiddleAndMissingBeginningName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenLocalWildcardInMiddleAndMissingBeginningName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailbox"); + boolean actual = testee.isExpressionMatch("mailbox"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenLocalWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenLocalWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("subw.hat.eve.rmailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("subw.hat.eve.rmailbox")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchSubFolderWhenFreeWildcardAtEnd() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox*", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchSubFolderWhenFreeWildcardAtEnd() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox*", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.sub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.sub")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenEmptyNameAndFreeWildcardAtEnd() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox*", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenEmptyNameAndFreeWildcardAtEnd() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox*", folderDelimiter()); - boolean actual = testee.isExpressionMatch(""); + boolean actual = testee.isExpressionMatch(""); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchFolderWhenFreeWildcardAtEndAndNoMatching() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox*", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchFolderWhenFreeWildcardAtEndAndNoMatching() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox*", folderDelimiter()); - boolean actual = testee.isExpressionMatch("sub"); + boolean actual = testee.isExpressionMatch("sub"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenFreeWildcardAtEndNotUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox*", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenFreeWildcardAtEndNotUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox*", folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailbox"); + boolean actual = testee.isExpressionMatch("mailbox"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenFreeWildcardAtEndUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox*", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenFreeWildcardAtEndUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "mailbox*", folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailbox123"); + boolean actual = testee.isExpressionMatch("mailbox123"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenEmptyNameAndFreeWildcardAtBeginning() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenEmptyNameAndFreeWildcardAtBeginning() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(""); + boolean actual = testee.isExpressionMatch(""); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchFolderWhenFreeWildcardAtBeginningAndNoMatching() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchFolderWhenFreeWildcardAtBeginningAndNoMatching() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("sub"); + boolean actual = testee.isExpressionMatch("sub"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenFreeWildcardAtBeginningNotUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenFreeWildcardAtBeginningNotUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailbox"); + boolean actual = testee.isExpressionMatch("mailbox"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenFreeWildcardAtBeginningUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenFreeWildcardAtBeginningUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("submailbox"); + boolean actual = testee.isExpressionMatch("submailbox"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchSubFolderWhenFreeWildcardAtBeginning() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchSubFolderWhenFreeWildcardAtBeginning() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenEmptyNameAndFreeWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenEmptyNameAndFreeWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(""); + boolean actual = testee.isExpressionMatch(""); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchFolderWhenFreeWildcardInMiddleAndMissingEndName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchFolderWhenFreeWildcardInMiddleAndMissingEndName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("sub"); + boolean actual = testee.isExpressionMatch("sub"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenFreeWildcardInMiddleNotUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenFreeWildcardInMiddleNotUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("submailbox"); + boolean actual = testee.isExpressionMatch("submailbox"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchSubFolderWhenFreeWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchSubFolderWhenFreeWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenFreeWildcardInMiddleNotUsedAndMissingBeginningName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenFreeWildcardInMiddleNotUsedAndMissingBeginningName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailbox"); + boolean actual = testee.isExpressionMatch("mailbox"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchDeeplyNestedFolderWhenFreeWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchDeeplyNestedFolderWhenFreeWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("subw.hat.eve.rmailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("subw.hat.eve.rmailbox")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenEmptyNameAndDoubleFreeWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub**mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenEmptyNameAndDoubleFreeWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub**mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(""); + boolean actual = testee.isExpressionMatch(""); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenDoubleFreeWildcardInMiddleAndMissingEndName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub**mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenDoubleFreeWildcardInMiddleAndMissingEndName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub**mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("sub"); + boolean actual = testee.isExpressionMatch("sub"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldReturnTrueWhenDoubleFreeWildcardInMiddleNotUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub**mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnTrueWhenDoubleFreeWildcardInMiddleNotUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub**mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("submailbox"); + boolean actual = testee.isExpressionMatch("submailbox"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchSubFolderWhenDoubleFreeWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub**mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchSubFolderWhenDoubleFreeWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub**mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenDoubleFreeWildcardInMiddleAndMissingBeginningName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub**mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenDoubleFreeWildcardInMiddleAndMissingBeginningName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub**mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailbox"); + boolean actual = testee.isExpressionMatch("mailbox"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchDeeplyNestedFolderWhenDoubleFreeWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub**mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchDeeplyNestedFolderWhenDoubleFreeWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub**mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("subw.hat.eve.rmailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("subw.hat.eve.rmailbox")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenEmptyNameAndFreeLocalWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenEmptyNameAndFreeLocalWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(""); + boolean actual = testee.isExpressionMatch(""); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenFreeLocalWildcardInMiddleAndMissingEndName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenFreeLocalWildcardInMiddleAndMissingEndName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("sub"); + boolean actual = testee.isExpressionMatch("sub"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenFreeLocalWildcardInMiddleNotUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenFreeLocalWildcardInMiddleNotUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("submailbox"); + boolean actual = testee.isExpressionMatch("submailbox"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchSubFolderWhenFreeLocalWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchSubFolderWhenFreeLocalWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenFreeLocalWildcardInMiddleAndMissingBeginningName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenFreeLocalWildcardInMiddleAndMissingBeginningName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailbox"); + boolean actual = testee.isExpressionMatch("mailbox"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchDeeplyNestedFolderWhenFreeLocalWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*%mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchDeeplyNestedFolderWhenFreeLocalWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*%mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("subw.hat.eve.rmailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("subw.hat.eve.rmailbox")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldReturnFalseWhenEmptyNameAndLocalFreeWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldReturnFalseWhenEmptyNameAndLocalFreeWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(""); + boolean actual = testee.isExpressionMatch(""); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchFolderWhenLocalFreeWildcardInMiddleAndMissingEndName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchFolderWhenLocalFreeWildcardInMiddleAndMissingEndName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("sub"); + boolean actual = testee.isExpressionMatch("sub"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenLocalFreewildcardInMiddleNotUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenLocalFreewildcardInMiddleNotUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("submailbox"); + boolean actual = testee.isExpressionMatch("submailbox"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchSubFolderWhenLocalFreeWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchSubFolderWhenLocalFreeWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldNotMatchFolderWhenLocalFreeWildcardInMiddleAndMissingBeginningName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchFolderWhenLocalFreeWildcardInMiddleAndMissingBeginningName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailbox"); + boolean actual = testee.isExpressionMatch("mailbox"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchDeeplyNestedFolderWhenLocalFreeWildcardInMiddle() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%*mailbox", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchDeeplyNestedFolderWhenLocalFreeWildcardInMiddle() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%*mailbox", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("subw.hat.eve.rmailbox")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("subw.hat.eve.rmailbox")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenMultipleFreeWildcards() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox*sub**", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenMultipleFreeWildcards() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox*sub**", folderDelimiter()); - boolean actual = testee.isExpressionMatch("submailboxsub"); + boolean actual = testee.isExpressionMatch("submailboxsub"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchDeeplyNestedFolderWhenMultipleFreeWildcardsNotUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox*sub**", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchDeeplyNestedFolderWhenMultipleFreeWildcardsNotUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox*sub**", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox.sub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailbox.sub")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchDeeplyNestedFolderWhenMultipleFreeWildcardsUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox*sub**", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchDeeplyNestedFolderWhenMultipleFreeWildcardsUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox*sub**", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("subtosh.boshmailboxtosh.boshsubboshtosh")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("subtosh.boshmailboxtosh.boshsubboshtosh")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenMultipleFreeWildcardsAndMissingMiddleName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox*sub**", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenMultipleFreeWildcardsAndMissingMiddleName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox*sub**", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.a.sub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.a.sub")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenMultipleFreeWildcardsAndMissingEndName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox*sub**", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenMultipleFreeWildcardsAndMissingEndName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox*sub**", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.a.submailbox.u")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.a.submailbox.u")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenMultipleFreeWildcardsAndMissingBeginningdName() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox*sub**", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenMultipleFreeWildcardsAndMissingBeginningdName() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox*sub**", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("utosh.boshmailboxtosh.boshsubasubboshtoshmailboxu")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("utosh.boshmailboxtosh.boshsubasubboshtoshmailboxu")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenMixedLocalFreeWildcardsNotUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox*sub", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenMixedLocalFreeWildcardsNotUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox*sub", folderDelimiter()); - boolean actual = testee.isExpressionMatch("submailboxsub"); + boolean actual = testee.isExpressionMatch("submailboxsub"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldNotMatchSubFolderWhenMixedLocalFreeWildcards() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox*sub", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchSubFolderWhenMixedLocalFreeWildcards() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub%mailbox*sub", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailboxsub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailboxsub")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenMixedFreeLocalWildcardsNotUsed() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenMixedFreeLocalWildcardsNotUsed() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); - boolean actual = testee.isExpressionMatch("submailboxsub"); + boolean actual = testee.isExpressionMatch("submailboxsub"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchSubFolderWhenMixedFreeLocalWildcards() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchSubFolderWhenMixedFreeLocalWildcards() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailboxsub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailboxsub")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldNotMatchSubFolderWhenMixedFreeLocalWildcards() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchSubFolderWhenMixedFreeLocalWildcards() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("submailbox.sub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("submailbox.sub")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchFolderWhenMixedFreeLocalWildcards() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchFolderWhenMixedFreeLocalWildcards() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); - boolean actual = testee.isExpressionMatch("submailboxwhateversub"); + boolean actual = testee.isExpressionMatch("submailboxwhateversub"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldNotMatchSubFolderEndingWithDelimiterWhenMixedFreeLocalWildcards() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchSubFolderEndingWithDelimiterWhenMixedFreeLocalWildcards() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("submailboxsub.Whatever.")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("submailboxsub.Whatever.")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenMixedFreeLocalWildcards() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenMixedFreeLocalWildcards() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailboxsub.sub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailboxsub.sub")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchSubFoldeWhenMixedFreeLocalWildcards() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchSubFoldeWhenMixedFreeLocalWildcards() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailboxsub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.mailboxsub")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchDeeplyNestedFoldeWhenMixedFreeLocalWildcards() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); + @Test + void isExpressionMatchShouldMatchDeeplyNestedFoldeWhenMixedFreeLocalWildcards() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "sub*mailbox%sub", folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.whatever.mailbox123sub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("sub.whatever.mailbox123sub")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldNotMatchFolderWhenTwoLocalPathDelimitedWildcards() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, adjustToActiveFolderDelimiter("%.%"), folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchFolderWhenTwoLocalPathDelimitedWildcards() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, adjustToActiveFolderDelimiter("%.%"), folderDelimiter()); - boolean actual = testee.isExpressionMatch("mailbox"); + boolean actual = testee.isExpressionMatch("mailbox"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenTwoLocalPathDelimitedWildcards() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, adjustToActiveFolderDelimiter("%.%"), folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenTwoLocalPathDelimitedWildcards() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, adjustToActiveFolderDelimiter("%.%"), folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.sub.sub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.sub.sub")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldMatchSubFolderWhenTwoLocalPathDelimitedWildcards() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, adjustToActiveFolderDelimiter("%.%"), folderDelimiter()); + @Test + void isExpressionMatchShouldMatchSubFolderWhenTwoLocalPathDelimitedWildcards() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, adjustToActiveFolderDelimiter("%.%"), folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.sub")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("mailbox.sub")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldMatchSubFolderWhenFreeWildcardAndPathDelimiterAtBeginning() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, adjustToActiveFolderDelimiter("*.test"), folderDelimiter()); + @Test + void isExpressionMatchShouldMatchSubFolderWhenFreeWildcardAndPathDelimiterAtBeginning() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, adjustToActiveFolderDelimiter("*.test"), folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("blah.test")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("blah.test")); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldNotMatchSubFolderWhenWhenFreeWildcardAndPathDelimiterAtBeginning() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, adjustToActiveFolderDelimiter("*.test"), folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchSubFolderWhenWhenFreeWildcardAndPathDelimiterAtBeginning() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, adjustToActiveFolderDelimiter("*.test"), folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("blah.test3")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("blah.test3")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenFreeWildcardAndPathDelimiterAtBeginning() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, adjustToActiveFolderDelimiter("*.test"), folderDelimiter()); + @Test + void isExpressionMatchShouldNotMatchDeeplyNestedFolderWhenFreeWildcardAndPathDelimiterAtBeginning() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, adjustToActiveFolderDelimiter("*.test"), folderDelimiter()); - boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("blah.test.go")); + boolean actual = testee.isExpressionMatch(adjustToActiveFolderDelimiter("blah.test.go")); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldIgnoreRegexInjection() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "folder^$!)(%3", folderDelimiter()); + @Test + void isExpressionMatchShouldIgnoreRegexInjection() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "folder^$!)(%3", folderDelimiter()); - boolean actual = testee.isExpressionMatch("folder^$!)(123"); + boolean actual = testee.isExpressionMatch("folder^$!)(123"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldIgnoreRegexInjectionWhenUsingEndOfQuoteAndNoMatching() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "\\Efo.", folderDelimiter()); + @Test + void isExpressionMatchShouldIgnoreRegexInjectionWhenUsingEndOfQuoteAndNoMatching() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "\\Efo.", folderDelimiter()); - boolean actual = testee.isExpressionMatch("\\Efol"); + boolean actual = testee.isExpressionMatch("\\Efol"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldIgnoreRegexInjectionWhenUsingEndOfQuoteAndMatching() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "\\Efo.", folderDelimiter()); + @Test + void isExpressionMatchShouldIgnoreRegexInjectionWhenUsingEndOfQuoteAndMatching() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "\\Efo.", folderDelimiter()); - boolean actual = testee.isExpressionMatch("\\Efo."); + boolean actual = testee.isExpressionMatch("\\Efo."); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldIgnoreRegexInjectionWhenUsingBeginOfQuoteAndNoMatching() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "\\Qfo?", folderDelimiter()); + @Test + void isExpressionMatchShouldIgnoreRegexInjectionWhenUsingBeginOfQuoteAndNoMatching() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "\\Qfo?", folderDelimiter()); - boolean actual = testee.isExpressionMatch("\\Qfol"); + boolean actual = testee.isExpressionMatch("\\Qfol"); - assertThat(actual).isFalse(); - } + assertThat(actual).isFalse(); + } - @Test - void isExpressionMatchShouldIgnoreRegexInjectionWhenUsingBeginOfQuoteAndMatching() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "\\Qfo?", folderDelimiter()); + @Test + void isExpressionMatchShouldIgnoreRegexInjectionWhenUsingBeginOfQuoteAndMatching() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "\\Qfo?", folderDelimiter()); - boolean actual = testee.isExpressionMatch("\\Qfo?"); + boolean actual = testee.isExpressionMatch("\\Qfo?"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldNotEscapeFreeWildcard() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "folder\\*", folderDelimiter()); + @Test + void isExpressionMatchShouldNotEscapeFreeWildcard() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "folder\\*", folderDelimiter()); - boolean actual = testee.isExpressionMatch("folder\\123"); + boolean actual = testee.isExpressionMatch("folder\\123"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } - @Test - void isExpressionMatchShouldNotEscapeLocalWildcard() { - PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "folder\\%", folderDelimiter()); + @Test + void isExpressionMatchShouldNotEscapeLocalWildcard() { + PrefixedRegex testee = new PrefixedRegex(EMPTY_PREFIX, "folder\\%", folderDelimiter()); - boolean actual = testee.isExpressionMatch("folder\\123"); + boolean actual = testee.isExpressionMatch("folder\\123"); - assertThat(actual).isTrue(); - } + assertThat(actual).isTrue(); + } } } \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org