Class AbstractAntTestHelper


  • public abstract class AbstractAntTestHelper
    extends java.lang.Object
    Quite an ugly classe, arguably useful for just 2 units test - nevertheless as there is a workaround that must be shared by both tests (PMD and CPD's) I felt compelled to move it to a single classes.
    Author:
    Romain Pelisse <[email protected]>
    • Field Detail

      • tempFolder

        public final org.junit.rules.TemporaryFolder tempFolder
      • buildRule

        public final org.apache.tools.ant.BuildFileRule buildRule
      • pathToTestScript

        protected java.lang.String pathToTestScript
      • antTestScriptFilename

        protected java.lang.String antTestScriptFilename
      • mvnWorkaround

        public java.lang.String mvnWorkaround
    • Constructor Detail

      • AbstractAntTestHelper

        public AbstractAntTestHelper()
    • Method Detail

      • setUp

        public void setUp()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • currentTempFile

        public java.io.File currentTempFile()
        Returns the current temporary file. Replaced by a fresh (inexistent) file before each test.
      • executeTarget

        public void executeTarget​(java.lang.String target)
      • assertOutputContaining

        public void assertOutputContaining​(java.lang.String text)
      • assertContains

        public void assertContains​(java.lang.String text,
                                   java.lang.String toFind)
      • assertDoesntContain

        public void assertDoesntContain​(java.lang.String text,
                                        java.lang.String toFind)