| | |
| | | } |
| | | |
| | | @Test |
| | | void physicallyDeletesSamplesBehindStepAggregate() |
| | | void keepsOriginalSamplesWhenDeletingStepAggregate() |
| | | { |
| | | TTestDataRevisionAction action = new TTestDataRevisionAction(); |
| | | action.setTestId(26L); action.setDataType("STEP"); action.setOperationType("DELETE"); |
| | |
| | | action.setReason("异常工步"); action.setOperatorName("tester"); |
| | | TTestDataOverride override = new TTestDataOverride(); |
| | | override.setStableIdentity("step:1:2:3:4"); override.setDeleted(true); |
| | | when(mapper.selectBtsSampleIdsByDeviceChannelStep(26L, 1L, 2L, 3, 4)) |
| | | .thenReturn(List.of(101L, 102L)); |
| | | |
| | | service.submitAction(action, List.of(override), List.of(), List.of()); |
| | | |
| | | verify(mapper).deleteBtsMeasurementsBySampleIds(List.of(101L, 102L)); |
| | | verify(mapper).deleteBtsSamplesByIds(26L, List.of(101L, 102L)); |
| | | verify(mapper).insertDataRevisionAction(action); |
| | | verify(mapper).upsertDataOverride(override); |
| | | org.mockito.Mockito.verifyNoMoreInteractions(mapper); |
| | | } |
| | | } |