org.kuali.student.mock.mojo
Class ConformanceTestExtendedCrudClassServiceWriter

java.lang.Object
  extended by org.kuali.student.contract.writer.XmlWriter
      extended by org.kuali.student.contract.writer.JavaClassWriter
          extended by org.kuali.student.mock.mojo.MockImplServiceWriter
              extended by org.kuali.student.mock.mojo.ConformanceTestBaseCrudClassServiceWriter
                  extended by org.kuali.student.mock.mojo.ConformanceTestExtendedCrudClassServiceWriter

public class ConformanceTestExtendedCrudClassServiceWriter
extends ConformanceTestBaseCrudClassServiceWriter

This class will generate the extended class that does CRUD tests as part of the Conformance Tests for services. The generated class will complete the base class and is meant to be generated once and then edited (and mantained) by developers.

Author:
Mezba Mahtab (mezba.mahtab@utoronto.ca)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.student.mock.mojo.MockImplServiceWriter
MockImplServiceWriter.MethodType
 
Field Summary
 
Fields inherited from class org.kuali.student.mock.mojo.ConformanceTestBaseCrudClassServiceWriter
H1_COMMENT_CHAR, H1_COMMENT_MARK_LENGTH, ROOT_PACKAGE
 
Fields inherited from class org.kuali.student.mock.mojo.MockImplServiceWriter
finder, methods, model, servKey
 
Constructor Summary
ConformanceTestExtendedCrudClassServiceWriter(ServiceContractModel model, String directory, String rootPackage, String servKey, List<ServiceMethod> methods, boolean isR1)
           
 
Method Summary
static String calcClassName(String servKey)
          Given the service key (name), returns a calculated class name for the conformance tester.
 void write()
          Write out the entire file
 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.
 
Methods inherited from class org.kuali.student.mock.mojo.ConformanceTestBaseCrudClassServiceWriter
calcNamesOfDTOsWithCrudManagedByService, calcPackage, doTestImportsAdd, filterServices, getDtoObjectNamesWithCrud, indentPrintDecoratedComment, indentPrintDecoratedComment, isServiceMethodTestedAsPartofCrudInBaseConformanceTest, writeTestCreate, writeTestCrud, writeTestDelete, writeTestReadAfterUpdate, writeTestUpdate
 
Methods inherited from class org.kuali.student.mock.mojo.MockImplServiceWriter
calcMethodType, calcObjectName, calcServiceInterfaceClassName, fixServKey, initLower
 
Methods inherited from class org.kuali.student.contract.writer.JavaClassWriter
closeBrace, getBody, getClassName, getDirectory, getFileName, getPackageName, getRootDirectory, importsAdd, indentPrintWrappedComment, openBrace, setPackageName, writeHeader, writeImports, writeJavaClassAndImportsOutToFile
 
Methods inherited from class org.kuali.student.contract.writer.XmlWriter
decrementIndent, escapeXML, getIndent, getOut, incrementIndent, indent, indent, indentPrint, indentPrintln, print, println, setIndent, setOut, writeAttribute, writeComment, writeCommentBox, writeTag, writeTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConformanceTestExtendedCrudClassServiceWriter

public ConformanceTestExtendedCrudClassServiceWriter(ServiceContractModel model,
                                                     String directory,
                                                     String rootPackage,
                                                     String servKey,
                                                     List<ServiceMethod> methods,
                                                     boolean isR1)
Method Detail

calcClassName

public static String calcClassName(String servKey)
Given the service key (name), returns a calculated class name for the conformance tester.


write

public void write()
Write out the entire file

Overrides:
write in class ConformanceTestBaseCrudClassServiceWriter

writetestCrudXXX_setDTOFieldsForTestCreate

public void writetestCrudXXX_setDTOFieldsForTestCreate(String dtoObjectName,
                                                       List<MessageStructure> messageStructures)
Writes the section to set fields specific to this dto for testCreate section.

Overrides:
writetestCrudXXX_setDTOFieldsForTestCreate in class ConformanceTestBaseCrudClassServiceWriter

writetestCrudXXX_testDTOFieldsForTestCreateUpdate

public void writetestCrudXXX_testDTOFieldsForTestCreateUpdate(String dtoObjectName,
                                                              List<MessageStructure> messageStructures)
Writes the section to test fields specific to this dto for testCreate and testUpdate sections.

Overrides:
writetestCrudXXX_testDTOFieldsForTestCreateUpdate in class ConformanceTestBaseCrudClassServiceWriter

writetestCrudXXX_setDTOFieldsForTestUpdate

public void writetestCrudXXX_setDTOFieldsForTestUpdate(String dtoObjectName,
                                                       List<MessageStructure> messageStructures)
Writes the section to set fields specific to this dto for testUpdate sections.

Overrides:
writetestCrudXXX_setDTOFieldsForTestUpdate in class ConformanceTestBaseCrudClassServiceWriter

writetestCrudXXX_testDTOFieldsForTestReadAfterUpdate

public void writetestCrudXXX_testDTOFieldsForTestReadAfterUpdate(String dtoObjectName,
                                                                 List<MessageStructure> messageStructures)
Writes the section to test fields specific to this dto for testReadAfterUpdate sections.

Overrides:
writetestCrudXXX_testDTOFieldsForTestReadAfterUpdate in class ConformanceTestBaseCrudClassServiceWriter

writetestCrudXXX_setDTOFieldsForTestReadAfterUpdate

public void writetestCrudXXX_setDTOFieldsForTestReadAfterUpdate(String dtoObjectName,
                                                                List<MessageStructure> messageStructures)
Writes the section to set fields specific to this dto for testReadAfterUpdate sections.

Overrides:
writetestCrudXXX_setDTOFieldsForTestReadAfterUpdate in class ConformanceTestBaseCrudClassServiceWriter


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.