优化
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ class PlatformOverseasQuoteControllerContractTest {
|
||||
assertThat(authorities.get("create")).contains("platform:overseas-master-data:quote:create");
|
||||
assertThat(authorities.get("update")).contains("platform:overseas-master-data:quote:edit");
|
||||
assertThat(authorities.get("status")).contains("platform:overseas-master-data:quote:status");
|
||||
assertThat(authorities.get("export")).contains("platform:overseas-master-data:quote:export");
|
||||
assertThat(authorities).doesNotContainKey("export");
|
||||
|
||||
Method options = Stream.of(PlatformOverseasQuoteController.class.getDeclaredMethods())
|
||||
.filter(method -> method.getName().equals("warehouseOptions"))
|
||||
|
||||
+1
-1
@@ -23,6 +23,6 @@ class PlatformVehicleControllerContractTest {
|
||||
assertThat(authorities.get("create")).contains("platform:overseas-master-data:vehicle:create");
|
||||
assertThat(authorities.get("update")).contains("platform:overseas-master-data:vehicle:edit");
|
||||
assertThat(authorities.get("status")).contains("platform:overseas-master-data:vehicle:status");
|
||||
assertThat(authorities.get("export")).contains("platform:overseas-master-data:vehicle:export");
|
||||
assertThat(authorities).doesNotContainKey("export");
|
||||
}
|
||||
}
|
||||
|
||||
+1
-6
@@ -63,12 +63,7 @@ class VehicleApplicationServiceTest {
|
||||
org.mockito.Mockito.verify(repository, org.mockito.Mockito.never()).create(org.mockito.ArgumentMatchers.any());
|
||||
}
|
||||
|
||||
@Test void exportUsesPlateAsBusinessIdentifierAndIncludesAllCapacityDimensions() {
|
||||
when(repository.list(org.mockito.ArgumentMatchers.any())).thenReturn(java.util.List.of(vehicle(3, 1000)));
|
||||
String csv = new String(service.exportCsv(new VehicleModels.Query(1, 20, null, null, null, null)), java.nio.charset.StandardCharsets.UTF_8);
|
||||
assertThat(csv).contains("最大托位,最大载重(kg),可用容积(m³)").contains("\"30\",\"18000\",\"90\"")
|
||||
.doesNotContain("车辆ID");
|
||||
}
|
||||
|
||||
|
||||
private static VehicleModels.Update update(long version, long mileage) {
|
||||
return new VehicleModels.Update(version, "ABC-001", "Box Truck", new BigDecimal("12.50"), mileage,
|
||||
|
||||
Reference in New Issue
Block a user