|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase gate.yam.depend.DependenciesTests
public class DependenciesTests
Tests for Dependencies
Constructor Summary | |
---|---|
DependenciesTests(String testName)
Create a Dependencies test case |
Method Summary | |
---|---|
protected void |
setUp()
Set up the tests for Dependencies |
String |
shorthandToPaths(String str)
Replace all file numbers in str with the equivalent canonical paths in yamFileNameMap. |
static junit.framework.Test |
suite()
Suite of tests for Dependencies |
void |
testCreateAndBasics()
Test a few Dependencies basics: equality, hashCode, YamFile creation and removal. |
void |
testDelete()
Test Dependencies YamFile deletion |
void |
testDelete2()
Test Dependencies - further YamFile deletion tests |
void |
testModify()
Test Dependencies YamFile modification |
void |
testNonYamChanges()
Test Dependencies File creation, deletion, and renaming |
void |
testNonYamLinks()
Test links to non-yam files and urls |
void |
testRename()
Test Dependencies YamFile renaming |
void |
testSerialization()
Test Dependencies serialization |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DependenciesTests(String testName)
testName
- The name of the testMethod Detail |
---|
protected void setUp()
setUp
in class junit.framework.TestCase
public void testCreateAndBasics() throws Exception
Exception
- if the test failspublic void testDelete() throws Exception
Exception
- if the test failspublic void testRename() throws Exception
Exception
- if the test failspublic void testDelete2() throws Exception
Exception
- if the test failspublic void testModify() throws Exception
Exception
- if the test failspublic void testNonYamLinks() throws Exception
Exception
- if the test failspublic void testNonYamChanges() throws Exception
Exception
- if the test failspublic void testSerialization() throws Exception
Exception
- if the test failspublic static junit.framework.Test suite()
public String shorthandToPaths(String str)
Replace all file numbers in str with the equivalent canonical paths in yamFileNameMap. All files used in Dependencies testing are named by convention as "yam-depends-\d+.yam". Dependencies will report its internal state graphs in the form "pathA:[pathB,pathC];pathB[pathD]", where pathX is the canonical path of a file.
For test files, we can refer to a Dependencies graph in a shorthand form using just the digit part of the test name, e.g. "1:[2,3];2[4]" and then translate this to full canonical paths using this method.
Non-yam files are referred to by their path relative to their linking node. They are replaced by their full canonical path. For example, "1:[some-file.html]", where some-file is not from yam, will become "/parent/path/yam-depends-1.yam:[/parent/path/some-file.html]"
str
- A string in which we want to replace numbers with test file
canonical paths
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |