2024-10-30 19:29:50 +01:00
|
|
|
import com.code_intelligence.jazzer.api.FuzzedDataProvider;
|
|
|
|
import com.code_intelligence.jazzer.junit.FuzzTest;
|
2024-11-27 13:09:22 +01:00
|
|
|
import org.junit.Assert;
|
|
|
|
import org.junit.Test;
|
2024-10-30 19:29:50 +01:00
|
|
|
|
|
|
|
import java.security.InvalidParameterException;
|
|
|
|
|
|
|
|
public class EmailMatcherFuzzTest {
|
|
|
|
@FuzzTest
|
|
|
|
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
|
|
|
|
String email = data.consumeString(100);
|
|
|
|
if(EmailMatcher.isValidEmail(email)) {
|
2024-11-27 13:09:22 +01:00
|
|
|
System.out.println("Valid email address: " + email);
|
2024-10-30 19:29:50 +01:00
|
|
|
throw new InvalidParameterException("Valid email found!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|