<commit_before>package com.smartdevicelink.api.screen;

import android.content.Context;
import android.net.Uri;

import com.smartdevicelink.api.BaseSubManager;
import com.smartdevicelink.api.FileManager;
import com.smartdevicelink.api.datatypes.SdlArtwork;
import com.smartdevicelink.proxy.interfaces.ISdl;
import com.smartdevicelink.proxy.rpc.DisplayCapabilities;
import com.smartdevicelink.proxy.rpc.MetadataTags;
import com.smartdevicelink.proxy.rpc.Show;
import com.smartdevicelink.proxy.rpc.TextField;
import com.smartdevicelink.proxy.rpc.enums.FileType;
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
import com.smartdevicelink.proxy.rpc.enums.MetadataType;
import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
import com.smartdevicelink.proxy.rpc.enums.TextFieldName;
import com.smartdevicelink.test.utl.AndroidToolsTests;

import org.json.JSONException;

import java.util.ArrayList;
import java.util.List;

import static org.mockito.Mockito.mock;

/**
 * This is a unit test class for the SmartDeviceLink library manager class :
 * {@link com.smartdevicelink.api.screen.TextAndGraphicManager}
 */
public class TextAndGraphicManagerTests extends AndroidToolsTests{

	// SETUP / HELPERS
	private TextAndGraphicManager textAndGraphicManager;
	private SdlArtwork testArtwork;

	@Override
	public void setUp() throws Exception{
		super.setUp();
		Context mTestContext = this.getContext();
		// mock things
		ISdl internalInterface = mock(ISdl.class);
		FileManager fileManager = mock(FileManager.class);

		testArtwork = new SdlArtwork();
		testArtwork.setName("testFile");
		Uri uri = Uri.parse("android.resource://" + mTestContext.getPackageName() + "/drawable/ic_sdl");
		testArtwork.setUri(uri);
		testArtwork.setType(FileType.GRAPHIC_PNG);

		textAndGraphicManager = new TextAndGraphicManager(internalInterface, fileManager);
	}

	@Override
	public void tearDown() throws Exception {
		super.tearDown();
	}

	private DisplayCapabilities getDisplayCapability(int numberOfMainFields){

		TextField mainField1 = new TextField();
		mainField1.setName(TextFieldName.mainField1);
		TextField mainField2 = new TextField();
		mainField2.setName(TextFieldName.mainField2);
		TextField mainField3 = new TextField();
		mainField3.setName(TextFieldName.mainField3);<commit_msg>Add a missing param in TextAndGraphicManagerTests<commit_after>package com.smartdevicelink.api.screen;

import android.content.Context;
import android.net.Uri;

import com.smartdevicelink.api.BaseSubManager;
import com.smartdevicelink.api.FileManager;
import com.smartdevicelink.api.datatypes.SdlArtwork;
import com.smartdevicelink.proxy.interfaces.ISdl;
import com.smartdevicelink.proxy.rpc.DisplayCapabilities;
import com.smartdevicelink.proxy.rpc.MetadataTags;
import com.smartdevicelink.proxy.rpc.Show;
import com.smartdevicelink.proxy.rpc.TextField;
import com.smartdevicelink.proxy.rpc.enums.FileType;
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
import com.smartdevicelink.proxy.rpc.enums.MetadataType;
import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
import com.smartdevicelink.proxy.rpc.enums.TextFieldName;
import com.smartdevicelink.test.utl.AndroidToolsTests;

import org.json.JSONException;

import java.util.ArrayList;
import java.util.List;

import static org.mockito.Mockito.mock;

/**
 * This is a unit test class for the SmartDeviceLink library manager class :
 * {@link com.smartdevicelink.api.screen.TextAndGraphicManager}
 */
public class TextAndGraphicManagerTests extends AndroidToolsTests{

	// SETUP / HELPERS
	private TextAndGraphicManager textAndGraphicManager;
	private SdlArtwork testArtwork;

	@Override
	public void setUp() throws Exception{
		super.setUp();
		Context mTestContext = this.getContext();
		// mock things
		ISdl internalInterface = mock(ISdl.class);
		FileManager fileManager = mock(FileManager.class);
		SoftButtonManager softButtonManager = mock(SoftButtonManager.class);

		testArtwork = new SdlArtwork();
		testArtwork.setName("testFile");
		Uri uri = Uri.parse("android.resource://" + mTestContext.getPackageName() + "/drawable/ic_sdl");
		testArtwork.setUri(uri);
		testArtwork.setType(FileType.GRAPHIC_PNG);

		textAndGraphicManager = new TextAndGraphicManager(internalInterface, fileManager, softButtonManager);
	}

	@Override
	public void tearDown() throws Exception {
		super.tearDown();
	}

	private DisplayCapabilities getDisplayCapability(int numberOfMainFields){

		TextField mainField1 = new TextField();
		mainField1.setName(TextFieldName.mainField1);
		TextField mainField2 = new TextField();
		mainField2.setName(TextFieldName.mainField2);
		TextField mainField3 = new TextField();
		mainField3.setName(TextFieldName.mainField3);
{'fraction_non_alphanumeric': 0.09884959522795057, 'fraction_numerical': 0.0038346825734980826, 'mean_word_length': 6.178899082568807, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3961907', 'n_tokens_mistral': 1547, 'n_tokens_neox': 1485, 'n_words': 266}