<commit_before>package com.sap.core.odata.processor.jpa.access;

import static org.junit.Assert.*;

import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;
import java.util.UUID;

import org.junit.Test;

import com.sap.core.odata.api.edm.EdmSimpleTypeKind;
import com.sap.core.odata.processor.jpa.exception.ODataJPAModelException;

public class JPATypeConvertorTest {

	private EdmSimpleTypeKind edmSimpleKindTypeString;
	private EdmSimpleTypeKind edmSimpleKindTypeByteArr;
	private EdmSimpleTypeKind edmSimpleKindTypeLong;
	private EdmSimpleTypeKind edmSimpleKindTypeShort;
	private EdmSimpleTypeKind edmSimpleKindTypeInteger;
	private EdmSimpleTypeKind edmSimpleKindTypeDouble;
	private EdmSimpleTypeKind edmSimpleKindTypeFloat;
	private EdmSimpleTypeKind edmSimpleKindTypeBigDecimal;
	private EdmSimpleTypeKind edmSimpleKindTypeByte;
	private EdmSimpleTypeKind edmSimpleKindTypeBoolean;
	private EdmSimpleTypeKind edmSimpleKindTypeDate;
	//private EdmSimpleTypeKind edmSimpleKindTypeCalendar;
	private EdmSimpleTypeKind edmSimpleKindTypeUUID;
	@Test
	public void testConvertToEdmSimpleType() {
		String str = "entity";
		byte[] byteArr = new byte[3];
		Long longObj = new Long(0);
		//Short shortObj = new Short((short) 0);
		Integer integerObj = new Integer(0);
		Double doubleObj = new Double(0);
		Float floatObj = new Float(0);
		BigDecimal bigDecimalObj = new BigDecimal(0);
		Byte byteObj = new Byte((byte) 0);
		Boolean booleanObj = Boolean.TRUE;
		Date dateObj = Calendar.getInstance().getTime();
		//Calendar cal = Calendar.getInstance();
		UUID uUID = new UUID(0, 0);
		
		try {
			edmSimpleKindTypeString = JPATypeConvertor.convertToEdmSimpleType(str.getClass());
			edmSimpleKindTypeByteArr = JPATypeConvertor.convertToEdmSimpleType(byteArr.getClass());
			edmSimpleKindTypeLong = JPATypeConvertor.convertToEdmSimpleType(longObj.getClass());
			edmSimpleKindTypeShort = JPATypeConvertor.convertToEdmSimpleType(Short.class);
			edmSimpleKindTypeInteger = JPATypeConvertor.convertToEdmSimpleType(integerObj.getClass());
			edmSimpleKindTypeDouble = JPATypeConvertor.convertToEdmSimpleType(doubleObj.getClass());
			edmSimpleKindTypeFloat = JPATypeConvertor.convertToEdmSimpleType(floatObj.getClass());
			edmSimpleKindTypeBigDecimal = JPATypeConvertor.convertToEdmSimpleType(bigDecimalObj.getClass());<commit_msg>Minor Change for Test<commit_after>package com.sap.core.odata.processor.jpa.access;

import static org.junit.Assert.*;

import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;
import java.util.UUID;

import org.junit.Test;

import com.sap.core.odata.api.edm.EdmSimpleTypeKind;
import com.sap.core.odata.processor.jpa.exception.ODataJPAModelException;

public class JPATypeConvertorTest {

	private EdmSimpleTypeKind edmSimpleKindTypeString;
	private EdmSimpleTypeKind edmSimpleKindTypeByteArr;
	private EdmSimpleTypeKind edmSimpleKindTypeLong;
	private EdmSimpleTypeKind edmSimpleKindTypeShort;
	private EdmSimpleTypeKind edmSimpleKindTypeInteger;
	private EdmSimpleTypeKind edmSimpleKindTypeDouble;
	private EdmSimpleTypeKind edmSimpleKindTypeFloat;
	private EdmSimpleTypeKind edmSimpleKindTypeBigDecimal;
	private EdmSimpleTypeKind edmSimpleKindTypeByte;
	private EdmSimpleTypeKind edmSimpleKindTypeBoolean;
	private EdmSimpleTypeKind edmSimpleKindTypeDate;
	//private EdmSimpleTypeKind edmSimpleKindTypeCalendar;
	private EdmSimpleTypeKind edmSimpleKindTypeUUID;
	
	@Test
	public void testConvertToEdmSimpleType() {
		String str = "entity";
		byte[] byteArr = new byte[3];
		Long longObj = new Long(0);
		Short shortObj = new Short((short) 0);
		Integer integerObj = new Integer(0);
		Double doubleObj = new Double(0);
		Float floatObj = new Float(0);
		BigDecimal bigDecimalObj = new BigDecimal(0);
		Byte byteObj = new Byte((byte) 0);
		Boolean booleanObj = Boolean.TRUE;
		Date dateObj = Calendar.getInstance().getTime();
		//Calendar cal = Calendar.getInstance();
		UUID uUID = new UUID(0, 0);
		
		try {
			edmSimpleKindTypeString = JPATypeConvertor.convertToEdmSimpleType(str.getClass());
			edmSimpleKindTypeByteArr = JPATypeConvertor.convertToEdmSimpleType(byteArr.getClass());
			edmSimpleKindTypeLong = JPATypeConvertor.convertToEdmSimpleType(longObj.getClass());
			edmSimpleKindTypeShort = JPATypeConvertor.convertToEdmSimpleType(shortObj.getClass());
			edmSimpleKindTypeInteger = JPATypeConvertor.convertToEdmSimpleType(integerObj.getClass());
			edmSimpleKindTypeDouble = JPATypeConvertor.convertToEdmSimpleType(doubleObj.getClass());
			edmSimpleKindTypeFloat = JPATypeConvertor.convertToEdmSimpleType(floatObj.getClass());
			edmSimpleKindTypeBigDecimal = JPATypeConvertor.convertToEdmSimpleType(bigDecimalObj.getClass());
{'fraction_non_alphanumeric': 0.08273228680526093, 'fraction_numerical': 0.004242681374628765, 'mean_word_length': 7.073630136986301, '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': '2775994', 'n_tokens_mistral': 1553, 'n_tokens_neox': 1481, 'n_words': 268}