org.squashtest.csp.tm.domain.testcase
Class TestCase

java.lang.Object
  extended by org.squashtest.csp.tm.domain.library.GenericLibraryNode
      extended by org.squashtest.csp.tm.domain.testcase.TestCaseLibraryNode
          extended by 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

Constructor Summary
TestCase()
           
 
Method Summary
 void accept(TestCaseLibraryNodeVisitor visitor)
           
 void addStep(int index, TestStep step)
           
 void addStep(TestStep step)
           
 void addVerifiedRequirement(RequirementVersion requirement)
          Adds a Requirement verified by this TestCase
 TestCase createPastableCopy()
           
 Set<Attachment> getAllAttachments()
           
 AttachmentList getAttachmentList()
          Should return the container for this object's attachments.
 String getClassName()
           
 String getClassSimpleName()
           
 TestCaseExecutionMode getExecutionMode()
           
 TestCaseImportance getImportance()
           
 int getPositionOfStep(long stepId)
           
 List<TestStep> getSteps()
           
 Set<RequirementVersion> getVerifiedRequirements()
           
 int getVersion()
           
 boolean isImportanceAuto()
           
 void moveStep(int stepIndex, int newIndex)
           
 void moveSteps(int newIndex, List<TestStep> movedSteps)
          Will move a list of steps to a new position.
 void removeVerifiedRequirement(RequirementVersion requirement)
           
 void setExecutionMode(TestCaseExecutionMode exectionMode)
           
 void setImportance(TestCaseImportance weight)
           
 void setImportanceAuto(boolean importanceAuto)
           
 
Methods inherited from class org.squashtest.csp.tm.domain.testcase.TestCaseLibraryNode
equals, getId, hashCode
 
Methods inherited from class org.squashtest.csp.tm.domain.library.GenericLibraryNode
getDescription, getName, getProject, notifyAssociatedWithProject, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCase

public TestCase()
Method Detail

getVersion

public int getVersion()

setExecutionMode

public void setExecutionMode(TestCaseExecutionMode exectionMode)

getExecutionMode

public TestCaseExecutionMode getExecutionMode()

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 complete
movedSteps - the list of steps to move, sorted by rank among each others.

getVerifiedRequirements

public Set<RequirementVersion> getVerifiedRequirements()
Returns:
UNMODIFIABLE VIEW of verified requirements.

accept

public void accept(TestCaseLibraryNodeVisitor visitor)
Specified by:
accept in class TestCaseLibraryNode

addVerifiedRequirement

public void addVerifiedRequirement(@NotNull
                                   RequirementVersion requirement)
Adds a Requirement verified by this TestCase

Parameters:
requirement - requirement to add, should not be null.

removeVerifiedRequirement

public void removeVerifiedRequirement(@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

isImportanceAuto

public boolean isImportanceAuto()
Returns:
the weightAuto

setImportanceAuto

public void setImportanceAuto(boolean importanceAuto)
Parameters:
importanceAuto - the importanceAuto to set


Copyright © 2010-2012 Squashtest TM, Squashtest.org. All Rights Reserved.