package com.mgaetan89.showsrage.fragment;

import com.google.gson.Gson;
import com.mgaetan89.showsrage.R;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

import java.util.Arrays;
import java.util.Collection;

import static org.assertj.core.api.Assertions.assertThat;

@RunWith(Parameterized.class)
public class ShowsSectionFragment_GetAdapterLayoutResourceTest {
	@Parameterized.Parameter(1)
	public int layoutId;

	@Parameterized.Parameter(0)
	public String preferedShowLayout;

	@Test
	public void getAdapterLayoutResource() {
		assertThat(ShowsSectionFragment.getAdapterLayoutResource(this.preferedShowLayout)).isEqualTo(this.layoutId);
	}

	@Parameterized.Parameters
	public static Collection<Object[]> data() {
		Gson gson = new Gson();

		return Arrays.asList(new Object[][]{
				{null, R.layout.adapter_shows_list_content_poster},
				{"", R.layout.adapter_shows_list_content_poster},
				{"banner", R.layout.adapter_shows_list_content_banner},
				{"fan_art", R.layout.adapter_shows_list_content_poster},
				{"poster", R.layout.adapter_shows_list_content_poster},
		});
	}
}

@@ -40,37 +40,8 @@
 t;%0A%0A
-import com.google.gson.Gson;%0A
 impo
@@ -475,24 +475,25 @@
 tring prefer
+r
 edShowLayout
@@ -614,16 +614,17 @@
 s.prefer
+r
 edShowLa
@@ -736,35 +736,8 @@
 ) %7B%0A
-%09%09Gson gson = new Gson();%0A%0A
 %09%09re

Remove unused variable and fix typo