|
||||||||||
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.YamTests
public class YamTests
Unit test for the YamFile class.
Constructor Summary | |
---|---|
YamTests(String testName)
Create the test case |
Method Summary | |
---|---|
void |
testContextPath()
Test a translation from yam to html out of context. |
void |
testFileTypes()
Test the file types enum. |
void |
testFSTranslate()
Test file-system translate method. |
void |
testHtmlToYamNoIncludes()
Test HtmlToYamConverter, using an html file generated with no includes processing. |
void |
testNoIncludes()
Test a translation of yam to html without processing includes. |
void |
testYamToHtmlToYam()
Test a round trip translation from yam to html and back to yam. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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 YamTests(String testName)
Method Detail |
---|
public void testFSTranslate() throws Exception
Exception
public void testContextPath() throws Exception
Exception
public void testFileTypes() throws Exception
Exception
public void testHtmlToYamNoIncludes() throws Exception
Test HtmlToYamConverter, using an html file generated with no includes processing. Takes the file yam-minimal-no-includes.html, and converts to yam im memory. Compares this in-memory yam with a disk copy of yam-minimal.yam.
If there is a difference between the original and resultant yam, then the resultant yam will be output to yam-again.yam-conversion-fault Results can be viewed by e.g:
tkdiff yam-minimal-no-includes.yam-conversion-fault \ test/resources/yam/yam-minimal.yam &
Exception
public void testYamToHtmlToYam() throws Exception
Test a round trip translation from yam to html and back to yam. Takes the file yam-again.yam and copies to yam-test.*.yam. Translates this to yam-test*.html on disk. Converts yam-test*.html to yam in memory. Compares this back to yam-again.yam.
There is some repetition of to other methods, and this method could instead make use of files output form those other methods (e.g. take a html file already generated from yam in a previous test). However, keeping this test separate keeps the intention clear and isolates it from changes to other tests.
If there is a difference between the original and resultant yam, then the resultant yam will be output and can be viewed with e.g. tkdiff. The intermediate html may also be viewed.
Exception
public void testNoIncludes() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |