Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ELY-2446] Add a test class for RegexNameRewriter #1784

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

mittalaishwarya
Copy link
Contributor

Pattern pattern = Pattern.compile("\\.");

RegexNameRewriter regexNameRewriter = new RegexNameRewriter(pattern, "dot", true);
MutableNameRewriter rewriter = new MutableNameRewriter(regexNameRewriter);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mittalaishwarya You don't need to use MutableNameRewriter at all to test RegexNameRewriter. You can just call method rewriteName on the regexNameRewriter

package org.wildfly.security.auth.util;

import org.junit.Test;
import org.wildfly.security.auth.util.RegexNameRewriter;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mittalaishwarya Just a minor, this class is in the same package as this test. So you don't have to import it

@Skyllarr
Copy link
Contributor

@mittalaishwarya Otherwise this looks good!

@cam-rod
Copy link
Contributor

cam-rod commented Sep 20, 2022

Hey, if you could squash these changes into one commit, that would be awesome. Thanks!

@Skyllarr
Copy link
Contributor

@mittalaishwarya Looks great, thank you!

@Skyllarr Skyllarr added the +1 DV label Sep 29, 2022
Copy link
Contributor

@fjuma fjuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay in getting this one merged, I've been away for a bit.

Thanks very much @mittalaishwarya!

@fjuma fjuma added the +1 FJ label Oct 7, 2022
@fjuma fjuma merged commit 5986e2c into wildfly-security:1.x Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants