GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mxgraph/java/test/com/mxgraph/test/mxModelTest.java at master · python1981/mxgraph

Expand file tree

/

mxModelTest.java

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
68 lines (58 loc) · 1.42 KB
/

mxModelTest.java

Copy path

File metadata and controls

68 lines (58 loc) · 1.42 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
* Copyright (c) 2006, Gaudenz Alder
*/
package com.mxgraph.test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import junit.textui.TestRunner;
import com.mxgraph.model.mxIGraphModel;
import com.mxgraph.view.mxGraph;
public class mxModelTest extends TestCase
{
/**
* Constructs a new test case for the specified name.
*
* @param name
* The name of the test case to be constructed.
*/
public mxModelTest(String name)
{
super(name);
}
/**
*
*/
public void test1() throws Exception
{
// Creates graph with model
mxGraph graph = new mxGraph();
Object parent = graph.getDefaultParent();
Object v1, v2, e1;
graph.getModel().beginUpdate();
try
{
v1 = graph.insertVertex(parent, null, "Hello", 20, 20, 80, 30);
v2 = graph.insertVertex(parent, null, "World!", 200, 150, 80, 30);
e1 = graph.insertEdge(parent, null, "e1", v1, v2);
}
finally
{
graph.getModel().endUpdate();
}
mxIGraphModel model = graph.getModel();
assertEquals(model.getTerminal(e1, true), v1);
assertEquals(model.getTerminal(e1, false), v2);
assertEquals(model.getParent(v1), model.getParent(v2));
assertEquals(model.getChildCount(parent), 3);
}
/**
* The main method of the template test suite.
*
* @param args
* The array of runtime arguments.
*/
public static void main(String[] args)
{
TestRunner.runAndWait(new TestSuite(mxModelTest.class));
}
}
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.