<commit_before>package io.github.lukehutch.fastclasspathscanner.test.internal;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.Test;

import io.github.lukehutch.fastclasspathscanner.FastClasspathScanner;
import io.github.lukehutch.fastclasspathscanner.scanner.ScanResult;
import io.github.lukehutch.fastclasspathscanner.test.external.ExternalAnnotation;
import io.github.lukehutch.fastclasspathscanner.test.external.ExternalInterface;
import io.github.lukehutch.fastclasspathscanner.test.external.ExternalSuperclass;

public class InternalExternalTest {
    @Test
    public void testWhitelistingExternalClasses() {
        final ScanResult scanResult = new FastClasspathScanner(InternalExternalTest.class.getPackage().getName(),
                ExternalAnnotation.class.getName()).verbose().scan();
        assertThat(scanResult.getNamesOfAllStandardClasses()).containsOnly(InternalExternalTest.class.getName(),
                InternalExtendsExternal.class.getName(), InternalImplementsExternal.class.getName(),
                InternalAnnotatedByExternal.class.getName());
        assertThat(scanResult.getNamesOfSubclassesOf(ExternalSuperclass.class.getName()))
                .containsExactly(InternalExtendsExternal.class.getName());
        assertThat(scanResult.getNamesOfAllInterfaceClasses()).isEmpty();
        assertThat(scanResult.getNamesOfClassesImplementing(ExternalInterface.class.getName()))
                .containsExactly(InternalImplementsExternal.class.getName());
        assertThat(scanResult.getNamesOfAllAnnotationClasses()).containsExactly(ExternalAnnotation.class.getName());
        assertThat(scanResult.getNamesOfClassesWithAnnotation(ExternalAnnotation.class.getName()))<commit_msg>Remove .verbose()<commit_after>package io.github.lukehutch.fastclasspathscanner.test.internal;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.Test;

import io.github.lukehutch.fastclasspathscanner.FastClasspathScanner;
import io.github.lukehutch.fastclasspathscanner.scanner.ScanResult;
import io.github.lukehutch.fastclasspathscanner.test.external.ExternalAnnotation;
import io.github.lukehutch.fastclasspathscanner.test.external.ExternalInterface;
import io.github.lukehutch.fastclasspathscanner.test.external.ExternalSuperclass;

public class InternalExternalTest {
    @Test
    public void testWhitelistingExternalClasses() {
        final ScanResult scanResult = new FastClasspathScanner(InternalExternalTest.class.getPackage().getName(),
                ExternalAnnotation.class.getName()).scan();
        assertThat(scanResult.getNamesOfAllStandardClasses()).containsOnly(InternalExternalTest.class.getName(),
                InternalExtendsExternal.class.getName(), InternalImplementsExternal.class.getName(),
                InternalAnnotatedByExternal.class.getName());
        assertThat(scanResult.getNamesOfSubclassesOf(ExternalSuperclass.class.getName()))
                .containsExactly(InternalExtendsExternal.class.getName());
        assertThat(scanResult.getNamesOfAllInterfaceClasses()).isEmpty();
        assertThat(scanResult.getNamesOfClassesImplementing(ExternalInterface.class.getName()))
                .containsExactly(InternalImplementsExternal.class.getName());
        assertThat(scanResult.getNamesOfAllAnnotationClasses()).containsExactly(ExternalAnnotation.class.getName());
        assertThat(scanResult.getNamesOfClassesWithAnnotation(ExternalAnnotation.class.getName()))
{'fraction_non_alphanumeric': 0.09758897818599312, 'fraction_numerical': 0.0, 'mean_word_length': 5.477695167286245, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6004771', 'n_tokens_mistral': 884, 'n_tokens_neox': 877, 'n_words': 82}