<commit_before>package com.aljoschability.vilima.scraper.tvdb.tests

import com.aljoschability.vilima.scraper.tvdb.TvdbService
import com.google.common.base.Charsets
import com.google.common.io.Files
import java.io.File
import org.junit.After
import org.junit.Before
import org.junit.Test
import retrofit.RestAdapter
import retrofit.RestAdapter.LogLevel

class TvdbServiceTests {
	TvdbService service

	@Test
	def void testGetShow() {
		println(service.getShow(76258, "en"))
	}

	@Test
	def void testSearchShow() {
		println(service.searchShow("Spartacus", "en"))
	}

	@Before def void start() {
		val builder = new RestAdapter.Builder()
		builder.endpoint = "http://thetvdb.com"
		builder.requestInterceptor = [
			addPathParam("apikey", apiKey)
		]

		val adapter = builder.build
		adapter.logLevel = LogLevel::FULL

		service = adapter.create(TvdbService)
	}

	@After def void stop() {
		service = null
	}

	@Deprecated
	def private static String getApiKey() {
		val path = '''C:\dev\repos\github.com\aljoschability\vilima\__TODO\apis\thetvdb.txt'''

		return Files::readFirstLine(new File(path), Charsets::UTF_8)
	}
}
<commit_msg>fixed tvdb service tests<commit_after>package com.aljoschability.vilima.scraper.tvdb.tests

import com.aljoschability.vilima.scraper.tvdb.TvdbService
import com.google.common.base.Charsets
import com.google.common.io.Files
import java.io.File
import org.junit.After
import org.junit.Before
import org.junit.Test
import retrofit.RestAdapter
import retrofit.RestAdapter.LogLevel
import retrofit.converter.SimpleXMLConverter

class TvdbServiceTests {
	TvdbService service

	@Test
	def void testGetSeries() {
		println(service.getSeries("Modern Family", "en"))
	}

	@Test
	def void testGetSeriesByRemoteID() {
		println(service.getSeriesByRemoteID("tt1442437", null, "en"))
	}

	@Test
	def void testGetEpisodeByAirDate() {
		println(service.getEpisodeByAirDate(95011, "2009-09-23", "en"))
	}

	@Test
	def void testGetFullSeriesRecord() {
		println(service.getFullSeriesRecord(95011, "en"))
	}

	@Before def void start() {
		val builder = new RestAdapter.Builder()
		builder.endpoint = "http://thetvdb.com"
		builder.requestInterceptor = [
			addPathParam("apikey", apiKey)
		]
		builder.converter = new SimpleXMLConverter

		val adapter = builder.build
		adapter.logLevel = LogLevel::FULL

		service = adapter.create(TvdbService)
	}

	@After def void stop() {
		service = null
	}

	@Deprecated
	def private static String getApiKey() {
		val path = '''C:\dev\repos\github.com\aljoschability\vilima\__TODO\apis\thetvdb.txt'''

		return Files::readFirstLine(new File(path), Charsets::UTF_8)
	}
}

{'fraction_non_alphanumeric': 0.11818528402592451, 'fraction_numerical': 0.012199771254288982, 'mean_word_length': 4.883408071748879, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2504246', 'n_tokens_mistral': 964, 'n_tokens_neox': 893, 'n_words': 173}