| | |
| | | Math.max(0d, last.offsetSeconds() - first.offsetSeconds()), first.voltageV(), status, |
| | | null, null)); |
| | | } |
| | | int firstStepNo = firstByStep.values().stream().findFirst().map(BtsExcelFixture.FixtureRecord::stepNo).orElse(0); |
| | | rows.add(new BtsTestPlanRow("CYCLE", firstStepNo, "循环", 0d, null, |
| | | rows.add(new BtsTestPlanRow("CYCLE", BtsExcelFixture.startStepNo(), "循环", 0d, null, |
| | | playback.naturallyFinished() ? "已完成" : "进行中", currentCycleNo, |
| | | (long) currentCycleRecords.size())); |
| | | rows.add(new BtsTestPlanRow("END", 0, "结束", 0d, null, |
| | |
| | | |
| | | static int recordCount() { return RECORDS.size(); } |
| | | static int cycleCount() { return CYCLES.size(); } |
| | | /** 设备 test 信息中的固定起始工步;该值不随当前循环变化。 */ |
| | | static int startStepNo() { return 2; } |
| | | static FixtureRecord record(long sequenceId) |
| | | { |
| | | if (sequenceId < 1 || sequenceId > RECORDS.size()) return null; |
| | |
| | | assertTrue(snapshot.rows().stream().anyMatch(row -> "STEP".equals(row.rowType()) && "进行中".equals(row.executionStatus()))); |
| | | assertTrue(snapshot.rows().stream().anyMatch(row -> "STEP".equals(row.rowType()) && "待执行".equals(row.executionStatus()))); |
| | | var cycleRow = snapshot.rows().stream().filter(row -> "CYCLE".equals(row.rowType())).findFirst().orElseThrow(); |
| | | assertEquals(2, cycleRow.stepNo()); |
| | | assertEquals(2, cycleRow.cycleCount()); |
| | | } |
| | | } |