public class TestCaseCreator extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TestCaseCreator.UnitFramework
Unit testing framework can be either JUnit or TestNG.
|
Constructor and Description |
---|
TestCaseCreator() |
Modifier and Type | Method and Description |
---|---|
static TestCaseCreator |
build()
Builder method for this creator.
|
String |
buildJavaFileContent()
Builds the Java file content based on a template file.
|
String |
buildXmlFileContent()
Builds ther XML file content based on a template file.
|
void |
createTestCase()
Create the test case.
|
String |
getAuthor()
Get the test author.
|
String |
getDescription()
Get the test description.
|
TestCaseCreator.UnitFramework |
getFramework()
Get the unit test framework (usually TestNG or JUnit).
|
String |
getName()
Get the test name.
|
String |
getPackage()
Get the test package.
|
String |
getSrcDirectory()
Get the test source directory.
|
String |
getTargetPackage()
Get the target package.
|
static void |
main(String[] args)
Main CLI method.
|
void |
setAuthor(String author)
Set the test author.
|
void |
setDescription(String description)
Set the test description.
|
void |
setFramework(TestCaseCreator.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.
|
TestCaseCreator |
usePackage(String targetPackage)
Set package via builder method.
|
TestCaseCreator |
useSrcDirectory(String srcDirectory)
Set test source directory via builder method.
|
TestCaseCreator |
withAuthor(String author)
Set author via builder method.
|
TestCaseCreator |
withDescription(String description)
Set description via builder method.
|
TestCaseCreator |
withFramework(TestCaseCreator.UnitFramework framework)
Set the unit testing framework to use.
|
TestCaseCreator |
withName(String name)
Set name via builder method.
|
TestCaseCreator |
withXmlRequest(String xmlRequest)
Set the request to use.
|
TestCaseCreator |
withXmlResponse(String xmlResponse)
Set the response to use.
|
public static void main(String[] args)
args
- public void createTestCase()
public String buildJavaFileContent()
public String buildXmlFileContent()
public static TestCaseCreator build()
public TestCaseCreator withName(String name)
name
- public TestCaseCreator withAuthor(String author)
author
- public TestCaseCreator withDescription(String description)
description
- public TestCaseCreator usePackage(String targetPackage)
targetPackage
- public TestCaseCreator useSrcDirectory(String srcDirectory)
srcDirectory
- public TestCaseCreator withFramework(TestCaseCreator.UnitFramework framework)
framework
- public TestCaseCreator withXmlRequest(String xmlRequest)
xmlRequest
- public TestCaseCreator withXmlResponse(String xmlResponse)
xmlResponse
- public void setName(String name)
name
- the name to setpublic String getName()
public void setAuthor(String author)
author
- the author to setpublic String getAuthor()
public void setDescription(String description)
description
- the description to setpublic String getDescription()
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()
public void setTargetPackage(String targetPackage)
targetPackage
- the targetPackage to setpublic TestCaseCreator.UnitFramework getFramework()
public void setFramework(TestCaseCreator.UnitFramework framework)
framework
- the framework to setCopyright © 2008–2017 ConSol Software GmbH. All rights reserved.