<commit_before>package org.gojul.gojulutils.safetools;

import static org.junit.Assert.*;

import java.text.DecimalFormatSymbols;
import java.util.Locale;

import org.junit.Test;

public class GojulDecimalFormatterTest {

	@Test(expected = NullPointerException.class)
	public void testFormatDoubleWithNullFormatThrowsException() {
		GojulDecimalFormatter.format(null, 1.345d);
	}
	
	@Test
	public void testFormatDouble() {
		Locale locale = Locale.getDefault();
		// For test portability
		Locale.setDefault(Locale.ENGLISH);
		assertEquals("01.345", GojulDecimalFormatter.format("00.000", 1.345d));
		Locale.setDefault(locale);
	}

	@Test(expected = NullPointerException.class)
	public void testFormatLongWithNullFormatThrowsException() {
		GojulDecimalFormatter.format(null, 1345);
	}
	
	@Test
	public void testFormatLong() {
		Locale locale = Locale.getDefault();
		// For test portability
		Locale.setDefault(Locale.ENGLISH);
		assertEquals("01345.000", GojulDecimalFormatter.format("00000.000", 1345L));
		Locale.setDefault(locale);
	}
	
	@Test(expected = NullPointerException.class)
	public void testFormatDoubleWithSymbolsWithNullFormatThrowsException() {
		GojulDecimalFormatter.format(null, new DecimalFormatSymbols(), 1.345d);
	}
	
	@Test(expected = NullPointerException.class)
	public void testFormatDoubleWithSymbolsWithNullSymbolsThrowsException() {
		GojulDecimalFormatter.format("00.000", null, 1.345d);
	}
	
	@Test
	public void testFormatDoubleWithSymbols() {
		assertEquals("01.345", GojulDecimalFormatter.format("00.000", new DecimalFormatSymbols(Locale.ENGLISH), 1.345d));
	}
	<commit_msg>Fixed unit tests<commit_after>package org.gojul.gojulutils.safetools;

import static org.junit.Assert.*;

import java.text.DecimalFormatSymbols;
import java.util.Locale;

import org.junit.Test;

public class GojulDecimalFormatterTest {

	@Test(expected = NullPointerException.class)
	public void testFormatDoubleWithNullFormatThrowsException() {
		GojulDecimalFormatter.format(null, 1.345d);
	}
	
	@Test
	public void testFormatDouble() {
		Locale locale = Locale.getDefault();
		// For test portability
		Locale.setDefault(Locale.ENGLISH);
		try {
			assertEquals("01.345", GojulDecimalFormatter.format("00.000", 1.345d));
		} finally {
			Locale.setDefault(locale);
		}
	}

	@Test(expected = NullPointerException.class)
	public void testFormatLongWithNullFormatThrowsException() {
		GojulDecimalFormatter.format(null, 1345);
	}
	
	@Test
	public void testFormatLong() {
		Locale locale = Locale.getDefault();
		// For test portability
		Locale.setDefault(Locale.ENGLISH);
		try {
			assertEquals("01345.000", GojulDecimalFormatter.format("00000.000", 1345L));
		} finally {
			Locale.setDefault(locale);
		}
	}
	
	@Test(expected = NullPointerException.class)
	public void testFormatDoubleWithSymbolsWithNullFormatThrowsException() {
		GojulDecimalFormatter.format(null, new DecimalFormatSymbols(), 1.345d);
	}
	
	@Test(expected = NullPointerException.class)
	public void testFormatDoubleWithSymbolsWithNullSymbolsThrowsException() {
		GojulDecimalFormatter.format("00.000", null, 1.345d);
	}
	
	@Test
	public void testFormatDoubleWithSymbols() {
		assertEquals("01.345", GojulDecimalFormatter.format("00.000", new DecimalFormatSymbols(Locale.ENGLISH), 1.345d));
	}
	
{'fraction_non_alphanumeric': 0.11426825542315919, 'fraction_numerical': 0.04216315307057745, 'mean_word_length': 5.863731656184487, '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': '378241', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1033, 'n_words': 174}