<commit_before>package nl.esciencecenter.vbrowser.vrs.data.xml;

import junit.framework.Assert;
import nl.esciencecenter.vbrowser.vrs.VRSClient;
import nl.esciencecenter.vbrowser.vrs.VRSContext;
import nl.esciencecenter.vbrowser.vrs.data.xml.XMLData;
import nl.esciencecenter.vbrowser.vrs.infors.InfoResourceNode;
import nl.esciencecenter.vbrowser.vrs.infors.InfoRootNode;
import nl.esciencecenter.vbrowser.vrs.infors.Test_InfoRS;
import nl.esciencecenter.vbrowser.vrs.vrl.VRL;

import org.junit.Test;

public class Test_XMLResourceNode_InfoRootNode
{

    @Test
    public void testRootNodeToXML() throws Exception
    {
        VRSClient vrsClient=Test_InfoRS.initTestClient();
        InfoRootNode rootNode = vrsClient.getInfoRootNode(); 
        Assert.assertNotNull(rootNode);
        
        XMLData data=new XMLData(new VRSContext()); 
        String xml=data.toXML(rootNode);
        System.out.printf(XMLData.prettyFormat(xml, 3));
        
    }

    @Test
    public void testRootNodeSubNodesToXML() throws Exception
    {
        VRSClient vrsClient=Test_InfoRS.initTestClient();
        VRSContext ctx=vrsClient.getVRSContext(); 
        
        InfoRootNode rootNode = vrsClient.getInfoRootNode(); 
    
        rootNode.addResourceLink("links","GFTP eslt007.local", new VRL("http://eslt007.local:2811/~"), null); 
        rootNode.addResourceLink("links","SFTP eslt007.local", new VRL("https://eslt007.local:22/~"), null); 
        rootNode.addResourceLink("links","LocalHome:/~", new VRL("file:///~"), null);
        
        rootNode.addResourceLink(null,"GFTP eslt007.local", new VRL("http://eslt007.local:2811/~"), null); 
        rootNode.addResourceLink(null,"SFTP eslt007.local", new VRL("https://eslt007.local:22/~"), null); 
        rootNode.addResourceLink(null,"LocalHome:/~", new VRL("file:///~"), null);
        
        XMLData data=new XMLData(ctx); 
        String xml=data.toXML(rootNode);
        System.out.printf(XMLData.prettyFormat(xml, 3));

        InfoResourceNode copyFolder = rootNode.createFolder("XMLCopy");
        data.addXMLResourceNodesTo(copyFolder, xml);
        
        
    }
    
}<commit_msg>Changed Junit version.<commit_after>package nl.esciencecenter.vbrowser.vrs.data.xml;

import nl.esciencecenter.vbrowser.vrs.VRSClient;
import nl.esciencecenter.vbrowser.vrs.VRSContext;
import nl.esciencecenter.vbrowser.vrs.infors.InfoResourceNode;
import nl.esciencecenter.vbrowser.vrs.infors.InfoRootNode;
import nl.esciencecenter.vbrowser.vrs.infors.Test_InfoRS;
import nl.esciencecenter.vbrowser.vrs.vrl.VRL;

import org.junit.Assert;
import org.junit.Test;

public class Test_XMLResourceNode_InfoRootNode
{

    @Test
    public void testRootNodeToXML() throws Exception
    {
        VRSClient vrsClient = Test_InfoRS.initTestClient();
        InfoRootNode rootNode = vrsClient.getInfoRootNode();
        Assert.assertNotNull(rootNode);

        XMLData data = new XMLData(new VRSContext());
        String xml = data.toXML(rootNode);
        System.out.printf(XMLData.prettyFormat(xml, 3));

    }

    @Test
    public void testRootNodeSubNodesToXML() throws Exception
    {
        VRSClient vrsClient = Test_InfoRS.initTestClient();
        VRSContext ctx = vrsClient.getVRSContext();

        InfoRootNode rootNode = vrsClient.getInfoRootNode();

        rootNode.addResourceLink("links", "GFTP eslt007.local", new VRL("http://eslt007.local:2811/~"), null);
        rootNode.addResourceLink("links", "SFTP eslt007.local", new VRL("https://eslt007.local:22/~"), null);
        rootNode.addResourceLink("links", "LocalHome:/~", new VRL("file:///~"), null);

        rootNode.addResourceLink(null, "GFTP eslt007.local", new VRL("http://eslt007.local:2811/~"), null);
        rootNode.addResourceLink(null, "SFTP eslt007.local", new VRL("https://eslt007.local:22/~"), null);
        rootNode.addResourceLink(null, "LocalHome:/~", new VRL("file:///~"), null);

        XMLData data = new XMLData(ctx);
        String xml = data.toXML(rootNode);
        System.out.printf(XMLData.prettyFormat(xml, 3));

        InfoResourceNode copyFolder = rootNode.createFolder("XMLCopy");
        data.addXMLResourceNodesTo(copyFolder, xml);

    }

}
{'fraction_non_alphanumeric': 0.1317108088761632, 'fraction_numerical': 0.018134096874254355, 'mean_word_length': 3.6785714285714284, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 13}, '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': '1897034', 'n_tokens_mistral': 1438, 'n_tokens_neox': 1350, 'n_words': 205}