<commit_before>package com.ge.research.sadl.model.visualizer;

import static org.junit.Assert.*;

import java.io.File;
import java.io.IOException;

import org.junit.Test;

import com.ge.research.sadl.model.visualizer.IGraphVisualizer.Orientation;
import com.ge.research.sadl.reasoner.ResultSet;

public class TestGraphVizVisualizer {

	@Test
	public void test() throws IOException {
		String exec = System.getenv("GraphVizPath");
		if (exec == null) {
			return;
		}
		String[] header = {"Head","Edge","Tail","Head_color", "Edge_color", "Tail_color"};
		String[][] data = {
				{"N1","p1","N2","blue","blue","yellow"},
				{"N1","p2","N3","blue","red","orange"},
				{"N3","p3","N4","orange", "black","green"},
				{"N3","p1","N5","orange","blue","magenta"},
				{"N4","p4","N5","green","green","magenta"},
				{"N5","p1","N1","magenta","blue","blue"}};
		ResultSet rs = new ResultSet(header, data);
		IGraphVisualizer gv = new GraphVizVisualizer();
		String tempDir = "c:/tmp/graphviztest";
		File tdf = new File(tempDir);
		tdf.mkdirs();
		String baseFileName = "testGraphVizVisualizer";
		String graphName = "test";
		String anchorNode = "N3";
		Orientation orientation = null;
		String description = "this is a test graph";
		gv.initialize(tempDir, baseFileName, graphName, anchorNode, orientation , description);
		gv.graphResultSetData(rs);
	}
<commit_msg>this test was the cause of the bad path ("c:"), generated on Linux<commit_after>package com.ge.research.sadl.model.visualizer;

import static org.junit.Assert.*;

import java.io.File;
import java.io.IOException;

import org.junit.Test;

import com.ge.research.sadl.model.visualizer.IGraphVisualizer.Orientation;
import com.ge.research.sadl.reasoner.ResultSet;

public class TestGraphVizVisualizer {

	@Test
	public void test() throws IOException {
		String exec = System.getenv("GraphVizPath");
		if (exec == null) {
			return;
		}
		String[] header = {"Head","Edge","Tail","Head_color", "Edge_color", "Tail_color"};
		String[][] data = {
				{"N1","p1","N2","blue","blue","yellow"},
				{"N1","p2","N3","blue","red","orange"},
				{"N3","p3","N4","orange", "black","green"},
				{"N3","p1","N5","orange","blue","magenta"},
				{"N4","p4","N5","green","green","magenta"},
				{"N5","p1","N1","magenta","blue","blue"}};
		ResultSet rs = new ResultSet(header, data);
		IGraphVisualizer gv = new GraphVizVisualizer();
		File cd = new File(".");
		String tempDir = cd.getCanonicalPath() + "/tmp/graphviztest";
		File tdf = new File(tempDir);
		tdf.mkdirs();
		String baseFileName = "testGraphVizVisualizer";
		String graphName = "test";
		String anchorNode = "N3";
		Orientation orientation = null;
		String description = "this is a test graph";
		gv.initialize(tempDir, baseFileName, graphName, anchorNode, orientation , description);
		gv.graphResultSetData(rs);
	}

{'fraction_non_alphanumeric': 0.1910828025477707, 'fraction_numerical': 0.013446567586694975, 'mean_word_length': 5.367117117117117, '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': '2899664', 'n_tokens_mistral': 1067, 'n_tokens_neox': 968, 'n_words': 193}