Skip to content

hibobshin/Testing_with_Junit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSE-464-2024-amarwah3

DotGraphParser Project

Overview

The DotGraphParser project provides functionality for parsing, modifying, and exporting DOT graphs. It allows you to:

  • Parse DOT files to create an internal graph representation.
  • Add nodes and edges to the graph, including handling duplicates.
  • Export the graph as a DOT file or as an image (PNG).

Features

  1. Parsing a DOT File

    • Ability to parse DOT files and load graph data.
  2. Add Nodes

    • Add new nodes to the graph.
    • Ensure no duplicate nodes are created.
  3. Add Edges

    • Create new edges between nodes.
  4. Export Graph

    • Export the graph to a DOT file.
    • Export the graph as a PNG image.

Installation

To use this project, you need Java and Maven installed.

Clone the repository:

git clone 

Navigate to the project directory:

cd CSE-464-2024-amarwah3

Build the project using Maven:

mvn clean install

Running The Code

To Parse the DOT file use:

DotGraphParser parser = new DotGraphParser();
parser.parseGraph("sampleGraph.dot");

To add new Nodes and Edges to the graph:

parser.addNode("NewNode");
parser.addEdge("NodeA", "NodeB");

To Export the Graph: 1. To DOT:

parser.outputDOTGraph("outputGraph.dot");

2. To PNG:

parser.outputGraphics("outputGraph.png", "png");

To Test

To test the code run:

mvn test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages