public abstract class AbstractTestGenerator<T extends TestGenerator> extends Object implements TestGenerator<T>
TestGenerator.GeneratorMode| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log
Logger
|
protected T |
self |
| Constructor and Description |
|---|
AbstractTestGenerator() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAuthor()
Get the test author.
|
protected String |
getCreationDate()
Get current date in special format.
|
String |
getDescription()
Get the test description.
|
String |
getFileExtension()
Gets the fileExtension.
|
UnitFramework |
getFramework()
Get the unit test framework (usually TestNG or JUnit).
|
protected String |
getMethodName()
Construct default test method name from test name.
|
String |
getName()
Get the test name.
|
String |
getPackage()
Get the test package.
|
String |
getSrcDirectory()
Get the test source directory.
|
protected File |
getTargetFile()
Construct proper target file to save test content to.
|
String |
getTargetPackage()
Get the target package.
|
protected String |
getUpdateDateTime()
Get current date time in special format.
|
boolean |
isDisabled()
Gets the disabled.
|
void |
setAuthor(String author)
Set the test author.
|
void |
setDescription(String description)
Set the test description.
|
void |
setDisabled(boolean disabled)
Sets the disabled.
|
void |
setFileExtension(String fileExtension)
Sets the fileExtension.
|
void |
setFramework(UnitFramework framework)
Set the unit test framework.
|
void |
setName(String name)
Set the test name.
|
void |
setPackage(String targetPackage)
Set the test package.
|
void |
setSrcDirectory(String srcDirectory)
Set the test source directory.
|
void |
setTargetPackage(String targetPackage)
Set the target package.
|
T |
usePackage(String targetPackage)
Set package via builder method.
|
T |
useSrcDirectory(String srcDirectory)
Set test source directory via builder method.
|
T |
withAuthor(String author)
Set author via builder method.
|
T |
withDescription(String description)
Set description via builder method.
|
T |
withDisabled(boolean disabled)
Set the disabled state to use.
|
T |
withFileExtension(String extension)
Set file extension via builder method.
|
T |
withFramework(UnitFramework framework)
Set the unit testing framework to use.
|
T |
withName(String name)
Set name via builder method.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, getMode, withModeprotected org.slf4j.Logger log
protected T extends TestGenerator self
public T withName(String name)
withName in interface TestGenerator<T extends TestGenerator>name - public T withAuthor(String author)
withAuthor in interface TestGenerator<T extends TestGenerator>author - public T withDescription(String description)
withDescription in interface TestGenerator<T extends TestGenerator>description - public T withFileExtension(String extension)
extension - public T usePackage(String targetPackage)
usePackage in interface TestGenerator<T extends TestGenerator>targetPackage - public T useSrcDirectory(String srcDirectory)
useSrcDirectory in interface TestGenerator<T extends TestGenerator>srcDirectory - public T withFramework(UnitFramework framework)
withFramework in interface TestGenerator<T extends TestGenerator>framework - public T withDisabled(boolean disabled)
withDisabled in interface TestGenerator<T extends TestGenerator>disabled - protected String getMethodName()
protected String getCreationDate()
protected String getUpdateDateTime()
protected File getTargetFile()
public void setName(String name)
name - the name to setpublic String getName()
getName in interface TestGenerator<T extends TestGenerator>public void setAuthor(String author)
author - the author to setpublic String getAuthor()
getAuthor in interface TestGenerator<T extends TestGenerator>public void setDescription(String description)
description - the description to setpublic String getDescription()
getDescription in interface TestGenerator<T extends TestGenerator>public void setPackage(String targetPackage)
targetPackage - the targetPackage to setpublic String getSrcDirectory()
public void setSrcDirectory(String srcDirectory)
srcDirectory - the srcDirectory to setpublic String getPackage()
public String getTargetPackage()
getTargetPackage in interface TestGenerator<T extends TestGenerator>public void setTargetPackage(String targetPackage)
targetPackage - the targetPackage to setpublic UnitFramework getFramework()
getFramework in interface TestGenerator<T extends TestGenerator>public void setFramework(UnitFramework framework)
framework - the framework to setpublic String getFileExtension()
public void setFileExtension(String fileExtension)
fileExtension - public boolean isDisabled()
isDisabled in interface TestGenerator<T extends TestGenerator>public void setDisabled(boolean disabled)
disabled - Copyright © 2008–2019 ConSol Software GmbH. All rights reserved.