Package net.officefloor.frame.test
Class StepTeam
- java.lang.Object
-
- net.officefloor.frame.api.team.source.impl.AbstractTeamSource
-
- net.officefloor.frame.test.StepTeam
-
- All Implemented Interfaces:
TeamSource
,Team
@TestSource public class StepTeam extends AbstractTeamSource implements Team
Team
that executes theJob
by theTestCase
. This effectively enables stepping through the logic to test.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.frame.api.team.source.impl.AbstractTeamSource
AbstractTeamSource.SpecificationContext
-
-
Constructor Summary
Constructors Constructor Description StepTeam()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assignJob(Job job)
Team
createTeam(TeamSourceContext context)
Creates theTeam
.void
executeJob()
Executes the currentJob
.protected void
loadSpecification(AbstractTeamSource.SpecificationContext context)
Overridden to load specification.void
startWorking()
Indicates for theTeam
to start working.void
stopWorking()
Indicates for theTeam
to stop working.-
Methods inherited from class net.officefloor.frame.api.team.source.impl.AbstractTeamSource
getSpecification
-
-
-
-
Method Detail
-
executeJob
public void executeJob()
Executes the currentJob
.
-
startWorking
public void startWorking()
Description copied from interface:Team
Indicates for theTeam
to start working.- Specified by:
startWorking
in interfaceTeam
-
stopWorking
public void stopWorking()
Description copied from interface:Team
Indicates for the
Team
to stop working.This method should block and only return control when the
Team
has stopped working and is no longer assignedJob
instances to complete.- Specified by:
stopWorking
in interfaceTeam
-
loadSpecification
protected void loadSpecification(AbstractTeamSource.SpecificationContext context)
Description copied from class:AbstractTeamSource
Overridden to load specification.- Specified by:
loadSpecification
in classAbstractTeamSource
- Parameters:
context
-AbstractTeamSource.SpecificationContext
.
-
createTeam
public Team createTeam(TeamSourceContext context) throws java.lang.Exception
Description copied from interface:TeamSource
Creates theTeam
.- Specified by:
createTeam
in interfaceTeamSource
- Parameters:
context
-TeamSourceContext
.- Returns:
Team
.- Throws:
java.lang.Exception
- If fails to configure theTeamSource
.
-
-