<commit_before>package com.beust.kobalt.maven

import com.beust.kobalt.Args
import com.beust.kobalt.TestModule
import com.beust.kobalt.maven.dependency.MavenDependency
import com.beust.kobalt.misc.DependencyExecutor
import org.testng.Assert
import org.testng.annotations.Test
import java.util.concurrent.ExecutorService
import javax.inject.Inject

@Test
@org.testng.annotations.Guice(modules = arrayOf(TestModule::class))
class RemoteRepoTest @Inject constructor(val repoFinder: RepoFinder,
        @DependencyExecutor val executor: ExecutorService, val args: Args){

    @Test
    fun mavenMetadata() {
        val dep = MavenDependency.create("org.codehaus.groovy:groovy-all:")
        // Note: this test might fail if a new version of Groovy gets uploaded, need
        // to find a stable (i.e. abandoned) package
        Assert.assertEquals(dep.id.split(":")[2], "2.4.5")
    }

    @Test(enabled = false)
    fun metadataForSnapshots() {
        val jar = MavenDependency.create("org.apache.maven.wagon:wagon-provider-test:2.10-SNAPSHOT",
                executor = executor).jarFile
        Assert.assertTrue(jar.get().exists())
    }

    fun resolveAarWithVersion() {
        val repoResult = repoFinder.findCorrectRepo("com.jakewharton.timber:timber:4.1.0")
        with(repoResult) {
            Assert.assertEquals(path, "com/jakewharton/timber/timber/4.1.0/timber-4.1.0.aar")
        }
    }<commit_msg>Fix test.<commit_after>package com.beust.kobalt.maven

import com.beust.kobalt.Args
import com.beust.kobalt.TestModule
import com.beust.kobalt.maven.dependency.MavenDependency
import com.beust.kobalt.misc.DependencyExecutor
import org.testng.Assert
import org.testng.annotations.Test
import java.util.concurrent.ExecutorService
import javax.inject.Inject

@Test
@org.testng.annotations.Guice(modules = arrayOf(TestModule::class))
class RemoteRepoTest @Inject constructor(val repoFinder: RepoFinder,
        @DependencyExecutor val executor: ExecutorService, val args: Args){

    @Test
    fun mavenMetadata() {
        val dep = MavenDependency.create("org.codehaus.groovy:groovy-all:")
        // Note: this test might fail if a new version of Groovy gets uploaded, need
        // to find a stable (i.e. abandoned) package
        with(dep.id.split(":")[2]) {
            Assert.assertTrue(this == "2.4.5" || this == "2.4.6")
        }
    }

    @Test(enabled = false)
    fun metadataForSnapshots() {
        val jar = MavenDependency.create("org.apache.maven.wagon:wagon-provider-test:2.10-SNAPSHOT",
                executor = executor).jarFile
        Assert.assertTrue(jar.get().exists())
    }

    fun resolveAarWithVersion() {
        val repoResult = repoFinder.findCorrectRepo("com.jakewharton.timber:timber:4.1.0")
        with(repoResult) {
            Assert.assertEquals(path, "com/jakewharton/timber/timber/4.1.0/timber-4.1.0.aar")
        }
    }
{'fraction_non_alphanumeric': 0.12144344205412907, 'fraction_numerical': 0.012144344205412909, 'mean_word_length': 3.3353383458646615, 'pattern_counts': {'":': 2, '<': 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': '4936737', 'n_tokens_mistral': 954, 'n_tokens_neox': 937, 'n_words': 166}