| | |
| | | void insertShouldValidateFieldsAndReplaceRelations() |
| | | { |
| | | TBatteryGroupTemplate template = template(null, " 默认模板 ", Arrays.asList(1L, 2L)); |
| | | template.setUpdateBy(null); |
| | | when(batteryGroupTemplateMapper.selectEnabledFieldsByIds(template.getFieldIds())) |
| | | .thenReturn(Arrays.asList(field(1L), field(2L))); |
| | | doAnswer(invocation -> { |
| | |
| | | assertEquals(0, captor.getValue().get(0).getSortOrder()); |
| | | assertEquals(1, captor.getValue().get(1).getSortOrder()); |
| | | assertEquals("默认模板", template.getTemplateName()); |
| | | assertEquals("admin", template.getUpdateBy()); |
| | | } |
| | | |
| | | @Test |