public class ConformanceTestBaseCrudClassServiceWriter extends MockImplServiceWriter
MockImplServiceWriter.MethodType
Modifier and Type | Field and Description |
---|---|
protected static String |
H1_COMMENT_CHAR |
protected static int |
H1_COMMENT_MARK_LENGTH |
static String |
ROOT_PACKAGE |
finder, methods, model, servKey
Constructor and Description |
---|
ConformanceTestBaseCrudClassServiceWriter(ServiceContractModel model,
String directory,
String rootPackage,
String servKey,
List<ServiceMethod> methods,
boolean isR1) |
ConformanceTestBaseCrudClassServiceWriter(ServiceContractModel model,
String directory,
String rootPackage,
String servKey,
List<ServiceMethod> methods,
boolean isR1,
String packageName,
String className) |
Modifier and Type | Method and Description |
---|---|
static String |
calcClassName(String servKey)
Given the service key (name), returns a calculated class name for the conformance tester.
|
protected List<String> |
calcNamesOfDTOsWithCrudManagedByService()
Gets a list of all the DTO names that are part of this service.
|
static String |
calcPackage(String servKey,
String rootPackage) |
protected void |
doTestImportsAdd()
Does the importsAdd for all files required for testing
|
static List<Service> |
filterServices(ServiceContractModel model,
ServicesFilter filter) |
protected List<String> |
getDtoObjectNamesWithCrud() |
void |
indentPrintDecoratedComment(String label)
Writes out a decorated comment.
|
void |
indentPrintDecoratedComment(String label,
String decorChar,
int decorLength)
Writes out a decorated comment, with the decoration string passed in.
|
protected boolean |
isServiceMethodTestedAsPartofCrudInBaseConformanceTest(ServiceMethod method)
Given a method type, returns true if this method is tested as part of CRUD operations
tested by the base test conformance class.
|
void |
write()
Write out the entire file
|
void |
writeTestCreate(String dtoObjectName,
List<MessageStructure> messageStructures)
Write the 'test create' portion.
|
void |
writeTestCrud(String dtoObjectName)
Write the CRUD test methods
|
void |
writetestCrudXXX_setDTOFieldsForTestCreate(String dtoObjectName,
List<MessageStructure> messageStructures)
Writes the section to set fields specific to this dto for testCreate section.
|
void |
writetestCrudXXX_setDTOFieldsForTestReadAfterUpdate(String dtoObjectName,
List<MessageStructure> messageStructures)
Writes the section to set fields specific to this dto for testReadAfterUpdate sections.
|
void |
writetestCrudXXX_setDTOFieldsForTestUpdate(String dtoObjectName,
List<MessageStructure> messageStructures)
Writes the section to set fields specific to this dto for testUpdate sections.
|
void |
writetestCrudXXX_testDTOFieldsForTestCreateUpdate(String dtoObjectName,
List<MessageStructure> messageStructures)
Writes the section to test fields specific to this dto for testCreate and testUpdate sections.
|
void |
writetestCrudXXX_testDTOFieldsForTestReadAfterUpdate(String dtoObjectName,
List<MessageStructure> messageStructures)
Writes the section to test fields specific to this dto for testReadAfterUpdate sections.
|
void |
writeTestDelete(String dtoObjectName,
List<MessageStructure> messageStructures)
Write the 'delete' portion.
|
void |
writeTestReadAfterUpdate(String dtoObjectName,
List<MessageStructure> messageStructures)
Write the 'read after update' portion.
|
void |
writeTestUpdate(String dtoObjectName,
List<MessageStructure> messageStructures)
Write the 'test update' portion.
|
calcMethodType, calcObjectName, calcServiceInterfaceClassName, fixServKey, initLower
closeBrace, getBody, getClassName, getDirectory, getFileName, getPackageName, getRootDirectory, importsAdd, indentPrintWrappedComment, openBrace, setPackageName, writeHeader, writeImports, writeJavaClassAndImportsOutToFile
decrementIndent, escapeXML, getIndent, getOut, incrementIndent, indent, indent, indentPrint, indentPrintln, print, println, setIndent, setOut, writeAttribute, writeComment, writeCommentBox, writeTag, writeTag
public static final String ROOT_PACKAGE
protected static final String H1_COMMENT_CHAR
protected static final int H1_COMMENT_MARK_LENGTH
public ConformanceTestBaseCrudClassServiceWriter(ServiceContractModel model, String directory, String rootPackage, String servKey, List<ServiceMethod> methods, boolean isR1)
public ConformanceTestBaseCrudClassServiceWriter(ServiceContractModel model, String directory, String rootPackage, String servKey, List<ServiceMethod> methods, boolean isR1, String packageName, String className)
protected List<String> getDtoObjectNamesWithCrud()
public static String calcPackage(String servKey, String rootPackage)
public static String calcClassName(String servKey)
public static List<Service> filterServices(ServiceContractModel model, ServicesFilter filter)
public void write()
write
in class MockImplServiceWriter
public void writeTestCrud(String dtoObjectName)
public void writeTestCreate(String dtoObjectName, List<MessageStructure> messageStructures)
public void writeTestUpdate(String dtoObjectName, List<MessageStructure> messageStructures)
public void writeTestReadAfterUpdate(String dtoObjectName, List<MessageStructure> messageStructures)
public void writeTestDelete(String dtoObjectName, List<MessageStructure> messageStructures)
public void indentPrintDecoratedComment(String label)
public void indentPrintDecoratedComment(String label, String decorChar, int decorLength)
public void writetestCrudXXX_setDTOFieldsForTestCreate(String dtoObjectName, List<MessageStructure> messageStructures)
public void writetestCrudXXX_testDTOFieldsForTestCreateUpdate(String dtoObjectName, List<MessageStructure> messageStructures)
public void writetestCrudXXX_setDTOFieldsForTestUpdate(String dtoObjectName, List<MessageStructure> messageStructures)
public void writetestCrudXXX_testDTOFieldsForTestReadAfterUpdate(String dtoObjectName, List<MessageStructure> messageStructures)
public void writetestCrudXXX_setDTOFieldsForTestReadAfterUpdate(String dtoObjectName, List<MessageStructure> messageStructures)
protected boolean isServiceMethodTestedAsPartofCrudInBaseConformanceTest(ServiceMethod method)
protected List<String> calcNamesOfDTOsWithCrudManagedByService()
protected void doTestImportsAdd()
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.