package org.enoir.graphvizapi.test;
import org.enoir.graphvizapi.Attribute;
import org.enoir.graphvizapi.Node;
import org.enoir.graphvizapi.exception.AttributeNotFondException;
import org.junit.Assert;
import org.junit.Test;

/**
 * Created by frank on 2014/11/27.
 */
public class TestException {
    @Test
    public void TestAttributeNotFond(){
        try {
            Node node = new Node("testId");
            node.addAttribute(new Attribute("color", "#000"));
            node.removeAttribute("label");
        }catch (AttributeNotFondException e) {
            Assert.assertTrue(true);
        }catch (Exception ex){
            Assert.assertTrue(false);
        }
    }
}


@@ -62,52 +62,9 @@
 api.
-Attribute;%0Aimport org.enoir.graphvizapi.Node
+*
 ;%0Aim
@@ -127,16 +127,71 @@
 eption;%0A
+import org.enoir.graphvizapi.exception.GraphException;%0A
 import o
@@ -680,17 +680,432 @@
       %7D%0A
-
     %7D
+%0A%0A    @Test%0A    public void TestDotCommandNotFound() %7B%0A        Graphviz gz = new Graphviz(%22/usr/bin/dot1%22,%22./%22);%0A        Graph graph = new Graph(%22g1%22, GraphType.DIGRAPH);%0A        String type = %22png%22;%0A        try %7B%0A            byte%5B%5D bytearray = gz.getGraphByteArray(graph, type, %22100%22);%0A            Assert.assertTrue(false);%0A        %7Dcatch (GraphException ge)%7B%0A            Assert.assertTrue(true);%0A        %7D%0A    %7D%0A%0A
 %0A%7D%0A%0A

Add dot command not found exception.