<commit_before>package org.sudoku.game.elements;

import org.junit.Test;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.sudoku.ResolveSudokuGameFieldTest.CONFIGURATION;
import static org.sudoku.ResolveSudokuGameFieldTest.ELEMENTS;

public class SquareTest {

	@Test
	public void squareRepresentationTest() {
		Square square = new Square.Builder(CONFIGURATION, ELEMENTS, 0, 0).build();
		String printableSquare =
				" --- --- --- \n" +
						"| 8 | 4 |   |\n" +
						" --- --- --- \n" +
						"|   | 5 |   |\n" +
						" --- --- --- \n" +
						"|   |   | 2 |\n" +
						" --- --- --- \n";
		assertThat(square.toString(), is(printableSquare));
	}
}<commit_msg>squares tests<commit_after>package org.sudoku.game.elements;

import org.junit.Before;
import org.junit.Test;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.sudoku.ResolveSudokuGameFieldTest.CONFIGURATION;
import static org.sudoku.ResolveSudokuGameFieldTest.ELEMENTS;

public class SquareTest {

	private Square square;

	@Before
	public void setUp()
			throws Exception {
		square = new Square.Builder(CONFIGURATION, ELEMENTS, 0, 0).build();
	}

	@Test
	public void squareRepresentationTest() {
		String printableSquare = " --- --- --- \n" +
				"| 8 | 4 |   |\n" +
				" --- --- --- \n" +
				"|   | 5 |   |\n" +
				" --- --- --- \n" +
				"|   |   | 2 |\n" +
				" --- --- --- \n";
		assertThat(square.toString(), is(printableSquare));
	}

	@Test
	public void testHasElement()
			throws Exception {
		final Element e = new Element.Builder(CONFIGURATION, 6).build();
		square.putElement(e, 2);
		assertThat(square.hasElement(e), is(true));
	}

	@Test
	public void testInsertedElementPosition()
			throws Exception {
		final Element e = new Element.Builder(CONFIGURATION, 6).build();
		final int position = 2;
		square.putElement(e, position);
		assertThat(square.getElementPosition(e), is(position));
	}
}
{'fraction_non_alphanumeric': 0.16292974588938713, 'fraction_numerical': 0.007972097658196313, 'mean_word_length': 3.0, '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': '6542921', 'n_tokens_mistral': 775, 'n_tokens_neox': 672, 'n_words': 137}