org.squashtest.csp.tm.domain.testcase
Class TestCase
java.lang.Object
org.squashtest.csp.tm.domain.library.GenericLibraryNode
org.squashtest.csp.tm.domain.testcase.TestCaseLibraryNode
org.squashtest.csp.tm.domain.testcase.TestCase
- All Implemented Interfaces:
- org.squashtest.csp.core.domain.Identified, AttachmentHolder, LibraryNode, ProjectResource, SelfClassAware
@Entity
public class TestCase
- extends TestCaseLibraryNode
- implements AttachmentHolder
- Author:
- Gregory Fouquet
TestCase
public TestCase(Date createdOn,
String createdBy)
TestCase
public TestCase()
getVersion
public int getVersion()
getReference
public String getReference()
- Returns:
- the reference of the test-case
setReference
public void setReference(String reference)
- Set the test-case reference
- Parameters:
reference -
getPrerequisite
public String getPrerequisite()
setExecutionMode
@Deprecated
public void setExecutionMode(TestCaseExecutionMode exectionMode)
- Deprecated. not set anymore in app
- Parameters:
exectionMode - - See Also:
isAutomated()
getExecutionMode
public TestCaseExecutionMode getExecutionMode()
- Returns:
- TODO either replaced by isAutomated or should be synchronized with isAutomated
- See Also:
isAutomated()
getSteps
public List<TestStep> getSteps()
addStep
public void addStep(@NotNull
TestStep step)
addStep
public void addStep(int index,
@NotNull
TestStep step)
moveStep
public void moveStep(int stepIndex,
int newIndex)
moveSteps
public void moveSteps(int newIndex,
List<TestStep> movedSteps)
- Will move a list of steps to a new position.
- Parameters:
newIndex - the position we want the first element of movedSteps to be once the operation is completemovedSteps - the list of steps to move, sorted by rank among each others.
getVerifiedRequirementVersions
public Set<RequirementVersion> getVerifiedRequirementVersions()
- Returns:
- UNMODIFIABLE VIEW of verified requirements.
accept
public void accept(TestCaseLibraryNodeVisitor visitor)
- Specified by:
accept in class TestCaseLibraryNode
addVerifiedRequirementVersion
public void addVerifiedRequirementVersion(@NotNull
RequirementVersion requirementVersion)
throws RequirementAlreadyVerifiedException
- Adds a
RequirementVersion verified by this TestCase
- Parameters:
requirementVersion - requirement to add, should not be null.
- Throws:
RequirementAlreadyVerifiedException - if this test case already verifies another version of the same requirment
addCopyOfVerifiedRequirementVersion
public void addCopyOfVerifiedRequirementVersion(RequirementVersion requirementVersionCopy)
- This should be used when making a copy of a
RequirementVersion to have the copy verified by this
TestCase.
When making a copy of a requirement, we cannot use addVerifiedRequirementVersion(RequirementVersion)
because of the single requirment check.
- Parameters:
requirementVersionCopy - a copy of an existing requirement version. It should not have a requirement yet.
checkRequirementNotVerified
public void checkRequirementNotVerified(RequirementVersion version)
throws RequirementAlreadyVerifiedException
- Parameters:
version -
- Throws:
RequirementAlreadyVerifiedException
removeVerifiedRequirementVersion
public void removeVerifiedRequirementVersion(@NotNull
RequirementVersion requirement)
getAttachmentList
public AttachmentList getAttachmentList()
- Description copied from interface:
AttachmentHolder
- Should return the container for this object's attachments. Should never return
null.
- Specified by:
getAttachmentList in interface AttachmentHolder
- Returns:
- the
AttachmentList of this object.
getAllAttachments
public Set<Attachment> getAllAttachments()
createPastableCopy
public TestCase createPastableCopy()
- Specified by:
createPastableCopy in interface LibraryNode- Specified by:
createPastableCopy in class TestCaseLibraryNode
getPositionOfStep
public int getPositionOfStep(long stepId)
throws UnknownEntityException
- Throws:
UnknownEntityException
getClassSimpleName
public String getClassSimpleName()
- Specified by:
getClassSimpleName in interface SelfClassAware
getClassName
public String getClassName()
- Specified by:
getClassName in interface SelfClassAware
getImportance
public TestCaseImportance getImportance()
- Returns:
- the weight
setImportance
public void setImportance(@NotNull
TestCaseImportance weight)
- Parameters:
weight - the weight to set
setPrerequisite
public void setPrerequisite(@NotNull
String prerequisite)
- Parameters:
prerequisite - the prerequisite to set
isImportanceAuto
public boolean isImportanceAuto()
- Returns:
- the weightAuto
setImportanceAuto
public void setImportanceAuto(boolean importanceAuto)
- Parameters:
importanceAuto - the importanceAuto to set
addVerifiedRequirement
public void addVerifiedRequirement(@NotNull
Requirement requirement)
throws NoVerifiableRequirementVersionException,
RequirementAlreadyVerifiedException
- This test case verifies the given requirement using its default verifiable version.
- Parameters:
requirement -
- Throws:
NoVerifiableRequirementVersionException - when there is no suitable version to be added
RequirementAlreadyVerifiedException - when this test case already verifies some version of the requirement.
getAutomatedTest
public AutomatedTest getAutomatedTest()
setAutomatedTest
public void setAutomatedTest(AutomatedTest testAutomationTest)
isAutomated
public boolean isAutomated()
Copyright © 2010-2012 Henix, henix.fr. All Rights Reserved.