Class WorkflowServiceTest
java.lang.Object
ubic.gemma.persistence.service.expression.experiment.WorkflowServiceTest
@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class)
public class WorkflowServiceTest
extends Object
Pure-Mockito unit tests for
WorkflowServiceImpl: state-machine
enforcement, idempotent no-op semantics, the disallowed-transition
exception. Does NOT exercise the @AuditedConditional aspect
(no Spring proxy here); aspect coverage lives in AuditedAspectTest
and the lifecycle integration test.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidSpec §"Acceptance criteria" exercises the full lifecycle:Discovery → Candidate → Preboarded → Loaded → Curate → Audit → Curate → Process → Audit → Public.voidvoidvoidvoidsetUp()voidvoid
-
Constructor Details
-
WorkflowServiceTest
public WorkflowServiceTest()
-
-
Method Details
-
setUp
@BeforeEach public void setUp() -
getCurrentState_returnsLoadedForNullField
@Test public void getCurrentState_returnsLoadedForNullField() -
getCurrentState_returnsField
@Test public void getCurrentState_returnsField() -
advance_allowedTransitionUpdatesStateAndTimestamp
@Test public void advance_allowedTransitionUpdatesStateAndTimestamp() -
advance_idempotentNoOpEmitsNoUpdate
@Test public void advance_idempotentNoOpEmitsNoUpdate() -
advance_disallowedTransitionThrows
@Test public void advance_disallowedTransitionThrows() -
advance_fullLifecycleSequence
@Test public void advance_fullLifecycleSequence()Spec §"Acceptance criteria" exercises the full lifecycle:Discovery → Candidate → Preboarded → Loaded → Curate → Audit → Curate → Process → Audit → Public. The pure-Mockito version of that test asserts only the state-machine sequence (no aspect, no real DB). The integration variant (orchestrator's job) layers the AUDIT_EVENT + INVESTIGATION row assertions on top. -
stateMachine_transitionTableMatchesHandoff
@Test public void stateMachine_transitionTableMatchesHandoff() -
stateMachine_canTransitionToIsStrict
@Test public void stateMachine_canTransitionToIsStrict()
-