<commit_before>package com.jakewharton.sdkmanager.internal

import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder
import org.junit.runner.RunWith
import org.junit.runners.Parameterized

import static com.android.SdkConstants.FD_TOOLS
import static org.fest.assertions.api.Assertions.assertThat

@RunWith(Parameterized)
class SdkDownloadTest {
  @Parameterized.Parameters(name = "{0}")
  public static Iterable<Object[]> data() {
    return SdkDownload.values().collect { [ it ] as Object[] }
  }

  @Parameterized.Parameter
  public SdkDownload sdkDownload;

  @Rule public TemporaryFolder temp = new TemporaryFolder()

  @Test public void downloadAndExtract() {
    def download = new File(temp.root, 'download')
    def destination = new File(temp.root, 'destination')

    assertThat(download).doesNotExist()
    assertThat(destination).doesNotExist()

    sdkDownload.download download, destination

    assertThat(download).doesNotExist()
    assertThat(destination).exists()
    assertThat(new File(destination, FD_TOOLS)).exists()
  }
}<commit_msg>Fix SdkDownloadTest download test<commit_after>package com.jakewharton.sdkmanager.internal

import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder
import org.junit.runner.RunWith
import org.junit.runners.Parameterized

import static com.android.SdkConstants.FD_TOOLS
import static org.fest.assertions.api.Assertions.assertThat

@RunWith(Parameterized)
class SdkDownloadTest {
  @Parameterized.Parameters(name = "{0}")
  public static Iterable<Object[]> data() {
    return SdkDownload.values().collect { [ it ] as Object[] }
  }

  @Parameterized.Parameter
  public SdkDownload sdkDownload;

  @Rule public TemporaryFolder temp = new TemporaryFolder()

  @Test public void downloadAndExtract() {
    def download = new File(temp.root, 'android-sdk.temp')
    def destination = new File(temp.root, 'destination')

    assertThat(download).doesNotExist()
    assertThat(destination).doesNotExist()

    sdkDownload.download destination

    assertThat(download).doesNotExist()
    assertThat(destination).exists()
    assertThat(new File(destination, FD_TOOLS)).exists()
  }
}
{'fraction_non_alphanumeric': 0.10567246111619397, 'fraction_numerical': 0.0009149130832570906, 'mean_word_length': 5.126050420168068, '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': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7252024', 'n_tokens_mistral': 647, 'n_tokens_neox': 635, 'n_words': 134}