org.squashtest.csp.tm.domain.campaign
Class TestSuite

java.lang.Object
  extended by org.squashtest.csp.tm.domain.campaign.TestSuite
All Implemented Interfaces:
org.squashtest.csp.core.domain.Identified

@Entity
public class TestSuite
extends Object
implements org.squashtest.csp.core.domain.Identified


Constructor Summary
TestSuite()
           
 
Method Summary
 void bindTestPlanItems(List<IterationTestPlanItem> items)
          Binds the test plan items to this test suite
 void bindTestPlanItemsById(List<Long> itemIds)
          Binds the test plan items to this test suite using their id to retrieve them from the iteration.
 TestSuite createPastableCopy()
           returns a copy of a test Suite without it's test plan.
 List<IterationTestPlanItem> createPastableCopyOfTestPlan()
           returns an ordered copy of the test-suite test plan
-test plans items that are not linked to a test case are not copied
-the copy of a test plan item is done using IterationTestPlanItem.createCopy()
 IterationTestPlanItem findFirstExecutableTestPlanItem()
           
 IterationTestPlanItem findNextExecutableTestPlanItem(long testPlanItemId)
          finds next item (that last execution has unexecuted step) or (has no execution and is not test case deleted) can return item linked to test-case with no step
 AttachmentList getAttachmentList()
           
 String getDescription()
           
 IterationTestPlanItem getFirstTestPlanItem()
           
 Long getId()
           
 Iteration getIteration()
           
 String getName()
           
 List<IterationTestPlanItem> getTestPlan()
          Warning : that property builds a new list every time.
 boolean isFirstExecutableTestPlanItem(long itemId)
          Determines if the item is the first of the test plan of the test suite
 boolean isLastExecutableTestPlanItem(long itemId)
           
 void rename(String newName)
           
 void reorderTestPlan(int newIndex, List<IterationTestPlanItem> movedItems)
          Since the test plan of a TestSuite is merely a view on the backing iteration, we will reorder here the test plan accordingly.
 void setDescription(String description)
           
 void setName(String name)
           
 void unBindTestPlan(List<IterationTestPlanItem> items)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestSuite

public TestSuite()
Method Detail

getId

public Long getId()
Specified by:
getId in interface org.squashtest.csp.core.domain.Identified

getName

public String getName()

setName

public void setName(String name)

rename

public void rename(String newName)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getIteration

public Iteration getIteration()

getAttachmentList

public AttachmentList getAttachmentList()

getTestPlan

public List<IterationTestPlanItem> getTestPlan()
Warning : that property builds a new list every time. If you want to change the content of the list, use the other dedicated accessors ( #addTestPlan(List)) or the other one)

Returns:

getFirstTestPlanItem

public IterationTestPlanItem getFirstTestPlanItem()

bindTestPlanItems

public void bindTestPlanItems(List<IterationTestPlanItem> items)
Binds the test plan items to this test suite

Parameters:
items -

unBindTestPlan

public void unBindTestPlan(List<IterationTestPlanItem> items)

bindTestPlanItemsById

public void bindTestPlanItemsById(List<Long> itemIds)
Binds the test plan items to this test suite using their id to retrieve them from the iteration.

Parameters:
itemIds -

reorderTestPlan

public void reorderTestPlan(int newIndex,
                            List<IterationTestPlanItem> movedItems)
Since the test plan of a TestSuite is merely a view on the backing iteration, we will reorder here the test plan accordingly. For instance if the newIndex is x in the TS test plan, Ix being the item at position x in the TS test plan, we will place the moved items at position y in Iteration test plan where y is the position of Ix in the Iteration test plan.


createPastableCopyOfTestPlan

public List<IterationTestPlanItem> createPastableCopyOfTestPlan()

returns an ordered copy of the test-suite test plan
-test plans items that are not linked to a test case are not copied
-the copy of a test plan item is done using IterationTestPlanItem.createCopy()

Returns:
an ordered copy of the test-suite test plan

createPastableCopy

public TestSuite createPastableCopy()

returns a copy of a test Suite without it's test plan.
a copy of the test plan can be found at createPastableCopyOfTestPlan()

Returns:
returns a copy of a test Suite

isLastExecutableTestPlanItem

public boolean isLastExecutableTestPlanItem(long itemId)

isFirstExecutableTestPlanItem

public boolean isFirstExecutableTestPlanItem(long itemId)
Determines if the item is the first of the test plan of the test suite


findNextExecutableTestPlanItem

public IterationTestPlanItem findNextExecutableTestPlanItem(long testPlanItemId)
finds next item (that last execution has unexecuted step) or (has no execution and is not test case deleted) can return item linked to test-case with no step

Parameters:
testPlanItemId -
Throws:
TestPlanItemNotExecutableException - if no item is found
IllegalArgumentException - if id does not correspond to an item of the test suite

findFirstExecutableTestPlanItem

public IterationTestPlanItem findFirstExecutableTestPlanItem()
Returns:
Throws:
{@link - TestPlanItemNotExecutableException}
{@link - EmptyTestSuiteTestPlanException}


Copyright © 2010-2012 Henix, henix.fr. All Rights Reserved.