<commit_before>package org.apache.tapestry5.internal.services

import org.apache.tapestry5.internal.test.InternalBaseTestCase
import org.apache.tapestry5.ioc.internal.util.CollectionFactory
import org.apache.tapestry5.ioc.services.ClassNameLocator
import org.apache.tapestry5.ioc.util.UnknownValueException
import org.apache.tapestry5.services.ComponentClassResolver
import org.apache.tapestry5.services.LibraryMapping
import org.easymock.EasyMock
import org.slf4j.Logger
import org.testng.annotations.Test

import static org.easymock.EasyMock.isA

class ComponentClassResolverImplTest extends InternalBaseTestCase {

    private static final String APP_ROOT_PACKAGE = "org.example.app"

    private static final List<LibraryMapping> APP_ROOT_PACKAGE_MAPPINGS = [new LibraryMapping("", APP_ROOT_PACKAGE)]

    private static final String CORE_PREFIX = "core"

    private static final String CORE_ROOT_PACKAGE = "org.apache.tapestry5.corelib"

    private static final String LIB_PREFIX = "lib"

    private static final String LIB_ROOT_PACKAGE = "org.example.lib"

    private ComponentClassResolverImpl create(Logger logger, ClassNameLocator locator, mappings) {

        return new ComponentClassResolverImpl(logger, locator, "Start", APP_ROOT_PACKAGE_MAPPINGS + mappings)
    }

    private Logger compliantLogger() {
        Logger logger = mockLogger()

        logger.info(EasyMock.isA(String.class))

        EasyMock.expectLastCall().atLeastOnce()

        return logger
    }

    @Test
    void simple_page_name() {
        ClassNameLocator locator = newClassNameLocator()
        Logger logger = compliantLogger()
<commit_msg>Update tests to match slight change in logging behavior<commit_after>package org.apache.tapestry5.internal.services

import org.apache.tapestry5.internal.test.InternalBaseTestCase
import org.apache.tapestry5.ioc.internal.util.CollectionFactory
import org.apache.tapestry5.ioc.services.ClassNameLocator
import org.apache.tapestry5.ioc.util.UnknownValueException
import org.apache.tapestry5.services.ComponentClassResolver
import org.apache.tapestry5.services.LibraryMapping
import org.easymock.EasyMock
import org.slf4j.Logger
import org.testng.annotations.Test

import static org.easymock.EasyMock.isA

class ComponentClassResolverImplTest extends InternalBaseTestCase {

    private static final String APP_ROOT_PACKAGE = "org.example.app"

    private static final List<LibraryMapping> APP_ROOT_PACKAGE_MAPPINGS = [new LibraryMapping("", APP_ROOT_PACKAGE)]

    private static final String CORE_PREFIX = "core"

    private static final String CORE_ROOT_PACKAGE = "org.apache.tapestry5.corelib"

    private static final String LIB_PREFIX = "lib"

    private static final String LIB_ROOT_PACKAGE = "org.example.lib"

    private ComponentClassResolverImpl create(Logger logger, ClassNameLocator locator, mappings) {

        return new ComponentClassResolverImpl(logger, locator, "Start", APP_ROOT_PACKAGE_MAPPINGS + mappings)
    }

    private Logger compliantLogger() {
        Logger logger = mockLogger()

        expect(logger.isInfoEnabled()).andReturn(true).atLeastOnce()

        logger.info(EasyMock.isA(String.class))

        EasyMock.expectLastCall().atLeastOnce()

        return logger
    }

    @Test
    void simple_page_name() {
        ClassNameLocator locator = newClassNameLocator()
        Logger logger = compliantLogger()

{'fraction_non_alphanumeric': 0.07585596221959859, 'fraction_numerical': 0.005312868949232586, 'mean_word_length': 4.648333333333333, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4675553', 'n_tokens_mistral': 1000, 'n_tokens_neox': 930, 'n_words': 205}