<commit_before>/*
 * This file is part of COMPASS. It is subject to the license terms in
 * the LICENSE file found in the top-level directory of this distribution.
 * (Also available at http://www.apache.org/licenses/LICENSE-2.0.txt)
 * You may not use this file except in compliance with the License.
 */
package de.dfki.asr.compass.model;

import de.dfki.asr.compass.math.Vector3f;
import de.dfki.asr.compass.model.components.PreviewImage;
import de.dfki.asr.compass.model.components.RenderGeometry;
import de.dfki.asr.compass.model.resource.Image;
import java.io.IOException;
import java.util.Arrays;
import java.util.Random;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
import org.testng.annotations.BeforeSuite;

public class SceneNodeDeepCopyTest {
	private SceneNode originalSceneNode, copiedSceneNode;

	@BeforeSuite
	public void setupCopy() throws IOException, ClassNotFoundException {
		originalSceneNode = initializeSceneNode();
		copiedSceneNode = (SceneNode) originalSceneNode.deepCopy();
	}

	@Test
	public void deepCopySceneNodesShouldClearIds() {
		assertEquals(copiedSceneNode.getId(), 0);
		for (SceneNode c: copiedSceneNode.getChildren()) {
			assertEquals(c.getId(), 0);
		}
		for (SceneNodeComponent c: copiedSceneNode.getComponents()) {
			assertEquals(c.getId(), 0);
		}
	}
	@Test
	public void deepCopySceneNodeShouldCopyChildNodes() {
		assertEquals(originalSceneNode.getChildren().size(), copiedSceneNode.getChildren().size());
		assertChildrenAreCopies(originalSceneNode, copiedSceneNode);<commit_msg>SceneNodeDeepCopyTest: give a reason for ClearIds test.<commit_after>/*
 * This file is part of COMPASS. It is subject to the license terms in
 * the LICENSE file found in the top-level directory of this distribution.
 * (Also available at http://www.apache.org/licenses/LICENSE-2.0.txt)
 * You may not use this file except in compliance with the License.
 */
package de.dfki.asr.compass.model;

import de.dfki.asr.compass.math.Vector3f;
import de.dfki.asr.compass.model.components.PreviewImage;
import de.dfki.asr.compass.model.components.RenderGeometry;
import de.dfki.asr.compass.model.resource.Image;
import java.io.IOException;
import java.util.Arrays;
import java.util.Random;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
import org.testng.annotations.BeforeSuite;

public class SceneNodeDeepCopyTest {
	private SceneNode originalSceneNode, copiedSceneNode;

	@BeforeSuite
	public void setupCopy() throws IOException, ClassNotFoundException {
		originalSceneNode = initializeSceneNode();
		copiedSceneNode = (SceneNode) originalSceneNode.deepCopy();
	}

	@Test
	public void deepCopySceneNodesShouldClearIds() {
		assertEquals(copiedSceneNode.getId(), 0);
		for (SceneNode c: copiedSceneNode.getChildren()) {
			assertEquals(c.getId(), 0, "SceneNode id");
		}
		for (SceneNodeComponent c: copiedSceneNode.getComponents()) {
			assertEquals(c.getId(), 0, "SceneNodeComponent id");
		}
	}
	@Test
	public void deepCopySceneNodeShouldCopyChildNodes() {
		assertEquals(originalSceneNode.getChildren().size(), copiedSceneNode.getChildren().size());
		assertChildrenAreCopies(originalSceneNode, copiedSceneNode);
{'fraction_non_alphanumeric': 0.10724365004703669, 'fraction_numerical': 0.0037629350893697085, 'mean_word_length': 5.618257261410788, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5220556', 'n_tokens_mistral': 968, 'n_tokens_neox': 933, 'n_words': 229}