<commit_before>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import sweng_assignment_1.GraphNode;

/**
 *
 * @author sam
 */
public class GraphNodeTest
{
    
    public GraphNodeTest()
    {
    }
    
    @BeforeClass
    public static void setUpClass()
    {
    }
    
    @AfterClass
    public static void tearDownClass()
    {
    }
    
    @Test
    public void testConstructor()
    {
        GraphNode newNode = new GraphNode(0, null);
    }
    
    @Test
    public void testLeftBranch()
    {
        GraphNode parentNode = new GraphNode(0, null);
        GraphNode leftNode = new GraphNode(1, parentNode);
        parentNode.addChild(leftNode);
        assert parentNode.leftBranch().id()==leftNode.id();
    }
    
    @Before
    public void setUp()
    {
    }
    
    @After
    public void tearDown()
    {
    }
    
}<commit_msg>tests for right branch of GraphNode<commit_after>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import sweng_assignment_1.GraphNode;

/**
 *
 * @author sam
 */
public class GraphNodeTest
{
    
    public GraphNodeTest()
    {
    }
    
    @BeforeClass
    public static void setUpClass()
    {
    }
    
    @AfterClass
    public static void tearDownClass()
    {
    }
    
    @Test
    public void testConstructor()
    {
        GraphNode newNode = new GraphNode(0, null);
    }
    
    @Test
    public void testLeftBranch()
    {
        GraphNode parentNode = new GraphNode(0, null);
        GraphNode leftNode = new GraphNode(1, parentNode);
        parentNode.addChild(leftNode);
        assert parentNode.leftBranch().id()==leftNode.id();
    }
    
    @Test
    public void testRightBranch()
    {
        GraphNode parentNode = new GraphNode(0, null);
        GraphNode rightNode = new GraphNode(1, parentNode);
        parentNode.addChild(rightNode);         //children always added left first, this may need to be changed
        parentNode.addChild(rightNode);
        assert parentNode.rightBranch().id()==rightNode.id();
    }
    
    @Before
    public void setUp()
    {
    }
    
    @After
    public void tearDown()
    {
    }
    
}
{'fraction_non_alphanumeric': 0.09611151870873075, 'fraction_numerical': 0.003668378576669112, 'mean_word_length': 2.4215809284818066, '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': '3859084', 'n_tokens_mistral': 809, 'n_tokens_neox': 813, 'n_words': 220}