public abstract class AbstractSerializeModelTest extends AbstractEnglishLocaleTest
| Modifier and Type | Field and Description |
|---|---|
protected static String |
HIGH
Task property.
|
protected static int |
LINE_NUMBER
Task property.
|
protected static String |
LOW
Task property.
|
protected static String |
MODULE1
Task property.
|
protected static String |
MODULE2
Task property.
|
protected static String |
NORMAL
Task property.
|
protected static String |
PACKAGE1
Task property.
|
protected static String |
PACKAGE2
Task property.
|
protected static String |
PATH_TO_FILE1
Task property.
|
protected static String |
PATH_TO_FILE2
Task property.
|
protected static String |
TEST_TASK1
Task property.
|
protected static String |
TEST_TASK2
Task property.
|
protected static String |
TEST_TASK3
Task property.
|
protected static String |
TEST_TASK4
Task property.
|
protected static String |
TEST_TASK5
Task property.
|
| Constructor and Description |
|---|
AbstractSerializeModelTest() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract hudson.plugins.analysis.util.model.AbstractAnnotation |
createAnnotation(int line,
String message,
hudson.plugins.analysis.util.model.Priority priority,
String fileName,
String packageName,
String moduleName)
Creates an annotation.
|
protected abstract hudson.XmlFile |
createXmlFile(File file)
Creates the XML serialization file.
|
protected <T> T |
deserialize(String fileName)
Creates a new object from the serialization data stored in the specified
file.
|
protected void |
ensureSerialization(String fileName)
Verifies that the specified XML file is a valid serialization of the
project.
|
void |
testObjectIsSameAfterDeserialization()
Test whether a serialized task is the same object after deserialization.
|
protected abstract void |
verifyFirstAnnotation(hudson.plugins.analysis.util.model.AbstractAnnotation annotation)
Verifies the first created annotation.
|
protected void |
verifyFirstAnnotation(hudson.plugins.analysis.util.model.JavaProject project)
Verifies the first annotation of the project.
|
protected void |
verifyProject(hudson.plugins.analysis.util.model.JavaProject project)
Verifies the created project.
|
initializeLocaleprotected static final String MODULE2
protected static final String MODULE1
protected static final String PACKAGE2
protected static final String PACKAGE1
protected static final String PATH_TO_FILE2
protected static final String PATH_TO_FILE1
protected static final String LOW
protected static final String NORMAL
protected static final String HIGH
protected static final String TEST_TASK5
protected static final String TEST_TASK4
protected static final String TEST_TASK3
protected static final String TEST_TASK2
protected static final String TEST_TASK1
protected static final int LINE_NUMBER
protected <T> T deserialize(String fileName)
T - type of objectfileName - the file to get the data fromprotected void verifyFirstAnnotation(hudson.plugins.analysis.util.model.JavaProject project)
project - the created projectprotected abstract void verifyFirstAnnotation(hudson.plugins.analysis.util.model.AbstractAnnotation annotation)
annotation - the first created annotationprotected abstract hudson.plugins.analysis.util.model.AbstractAnnotation createAnnotation(int line,
String message,
hudson.plugins.analysis.util.model.Priority priority,
String fileName,
String packageName,
String moduleName)
line - the linemessage - the messagepriority - the priorityfileName - the file namepackageName - the package namemoduleName - the module namepublic void testObjectIsSameAfterDeserialization()
throws Exception
Exception - Signals a test failureprotected abstract hudson.XmlFile createXmlFile(File file)
file - the file for the XML dataprotected void verifyProject(hudson.plugins.analysis.util.model.JavaProject project)
project - the created projectprotected void ensureSerialization(String fileName)
fileName - the file nameCopyright © 2016–2017. All rights reserved.