<commit_before>package jetbrains.buildServer.nuget.tests.agent.index

import jetbrains.buildServer.ExtensionHolder
import jetbrains.buildServer.agent.InternalPropertiesHolder
import jetbrains.buildServer.agent.impl.AgentEventDispatcher
import jetbrains.buildServer.agent.impl.artifacts.ArchivePreprocessor
import jetbrains.buildServer.agent.impl.artifacts.ZipPreprocessor
import jetbrains.buildServer.nuget.agent.index.NuGetPackagePathProvider
import org.jmock.Expectations
import org.jmock.Mockery
import org.testng.Assert
import org.testng.annotations.DataProvider
import org.testng.annotations.Test
import java.util.function.BiFunction

class NuGetPackagePathProviderTest {

    @Test(dataProvider = "testPackagePaths")
    fun testPackagePath(path: String, fileName: String, expectedPath: String?) {
        val m = Mockery()
        val extensionHolder = m.mock(ExtensionHolder::class.java)
        val propertiesHolder = m.mock(BiFunction::class.java)
        val preprocessor = ZipPreprocessor(AgentEventDispatcher(), createTempDir(), propertiesHolder)

        m.checking(object: Expectations() {
            init {
                allowing(extensionHolder).getExtensions(with(ArchivePreprocessor::class.java))
                will(returnValue(listOf(preprocessor)))
            }
        })<commit_msg>try to fix compilation after changes in core #3<commit_after>package jetbrains.buildServer.nuget.tests.agent.index

import jetbrains.buildServer.ExtensionHolder
import jetbrains.buildServer.agent.InternalPropertiesHolder
import jetbrains.buildServer.agent.impl.AgentEventDispatcher
import jetbrains.buildServer.agent.impl.artifacts.ArchivePreprocessor
import jetbrains.buildServer.agent.impl.artifacts.ZipPreprocessor
import jetbrains.buildServer.nuget.agent.index.NuGetPackagePathProvider
import org.jmock.Expectations
import org.jmock.Mockery
import org.testng.Assert
import org.testng.annotations.DataProvider
import org.testng.annotations.Test
import java.util.function.BiFunction

class NuGetPackagePathProviderTest {

    @Test(dataProvider = "testPackagePaths")
    fun testPackagePath(path: String, fileName: String, expectedPath: String?) {
        val m = Mockery()
        val extensionHolder = m.mock(ExtensionHolder::class.java)
        val propertiesHolder = m.mock(BiFunction::class.java)
        val preprocessor = ZipPreprocessor(AgentEventDispatcher(), createTempDir(), BiFunction<String, String, String> {k, d -> d})

        m.checking(object: Expectations() {
            init {
                allowing(extensionHolder).getExtensions(with(ArchivePreprocessor::class.java))
                will(returnValue(listOf(preprocessor)))
            }
        })
{'fraction_non_alphanumeric': 0.08935219657483247, 'fraction_numerical': 0.00037230081906180194, 'mean_word_length': 4.574688796680498, 'pattern_counts': {'":': 0, '<': 4, '<?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': '2898040', 'n_tokens_mistral': 735, 'n_tokens_neox': 700, 'n_words': 125}