public abstract class TestProcessorDef
extends junit.framework.TestCase
Constructor and Description |
---|
TestProcessorDef(String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract com.github.maven_nar.cpptasks.ProcessorDef |
create()
Creates a new processor definition.
|
protected com.github.maven_nar.cpptasks.ProcessorDef |
createExtendedProcessorDef(com.github.maven_nar.cpptasks.ProcessorDef baseProcessor)
Creates a processor initialized to be an extension of the base processor.
|
protected com.github.maven_nar.cpptasks.compiler.ProcessorConfiguration |
getConfiguration(com.github.maven_nar.cpptasks.ProcessorDef extendedProcessor)
Gets the processor configuration.
|
protected abstract String[] |
getPreArguments(com.github.maven_nar.cpptasks.ProcessorDef processor)
Gets command line arguments that precede filenames.
|
void |
testExtendsDebug()
Tests that the debug attribute in the base processor is effective when
creating the command line for a processor that extends it.
|
protected void |
testExtendsFileSet(File tempFile)
Tests that a fileset in the base processor is effective when evaluating
the files included in an extending processor.
|
void |
testExtendsIf()
Tests that the if attribute in the base processor is effective when
evaluating if an extending processor is active.
|
protected void |
testExtendsRebuild(com.github.maven_nar.cpptasks.ProcessorDef baseProcessor)
Tests that the rebuild attribute in the base processor is effective when
creating the command line for a processor that extends it.
|
void |
testExtendsUnless()
Tests that the unless attribute in the base processor is effective when
evaluating if an extending processor is active.
|
void |
testIsActive2()
Tests that isActive returns true when "if" references a set property.
|
void |
testIsActive3()
Tests that isActive returns false when "if" references an unset property.
|
void |
testIsActive4()
Tests that evaluating isActive when "if" refernces a property with the
value "false" throws an exception to warn of a suspicious value.
|
void |
testIsActive5()
Tests that isActive returns false when "unless" references a set
property.
|
void |
testIsActive6()
Tests that isActive returns true when "unless" references an unset
property.
|
void |
testIsActive7()
Tests that evaluating isActive when "unless" references a property with
the value "false" throws an exception to warn of a suspicious value.
|
void |
testIsActive8()
Tests if a processor is active when both "if" and "unless" are specified
and the associated properties are set.
|
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
public TestProcessorDef(String name)
name
- test nameprotected abstract com.github.maven_nar.cpptasks.ProcessorDef create()
protected final com.github.maven_nar.cpptasks.ProcessorDef createExtendedProcessorDef(com.github.maven_nar.cpptasks.ProcessorDef baseProcessor)
baseProcessor
- base processorprotected final com.github.maven_nar.cpptasks.compiler.ProcessorConfiguration getConfiguration(com.github.maven_nar.cpptasks.ProcessorDef extendedProcessor)
extendedProcessor
- processor under testprotected abstract String[] getPreArguments(com.github.maven_nar.cpptasks.ProcessorDef processor)
processor
- processor under testpublic final void testExtendsDebug()
protected final void testExtendsFileSet(File tempFile) throws IOException
tempFile
- temporary fileIOException
- if unable to delete filepublic final void testExtendsIf()
protected final void testExtendsRebuild(com.github.maven_nar.cpptasks.ProcessorDef baseProcessor)
baseProcessor
- processor under testpublic final void testExtendsUnless()
public final void testIsActive2()
public final void testIsActive3()
public final void testIsActive4()
public final void testIsActive5()
public final void testIsActive6()
public final void testIsActive7()
public final void testIsActive8()
Copyright © 2005-2016 NAR Maven Plugin developers. All Rights Reserved.