TSK-1386: made all our lower case test names upper case to match our naming convention
This commit is contained in:
parent
a64f8e14f3
commit
83feab0955
|
@ -27,7 +27,7 @@ class DeleteHistoryEventsOnTaskDeletionAccTest extends AbstractAccTest {
|
|||
|
||||
@Test
|
||||
@WithAccessId(user = "admin")
|
||||
void should_deleteHistoryEvents_When_TaskIsDeleted_With_HistoryDeletionEnabled()
|
||||
void should_DeleteHistoryEvents_When_TaskIsDeleted_With_HistoryDeletionEnabled()
|
||||
throws Exception {
|
||||
|
||||
final String taskid = "TKI:000000000000000000000000000000000036";
|
||||
|
@ -58,7 +58,7 @@ class DeleteHistoryEventsOnTaskDeletionAccTest extends AbstractAccTest {
|
|||
|
||||
@Test
|
||||
@WithAccessId(user = "admin")
|
||||
void should_deleteHistoryEvents_When_TasksAreDeleted_With_HistoryDeletionEnabled()
|
||||
void should_DeleteHistoryEvents_When_TasksAreDeleted_With_HistoryDeletionEnabled()
|
||||
throws Exception {
|
||||
|
||||
final String taskId_1 = "TKI:000000000000000000000000000000000037";
|
||||
|
@ -98,7 +98,7 @@ class DeleteHistoryEventsOnTaskDeletionAccTest extends AbstractAccTest {
|
|||
|
||||
@Test
|
||||
@WithAccessId(user = "admin")
|
||||
void should_notDeleteHistoryEvents_When_TaskIsDeleted_With_HistoryDeletionDisabled()
|
||||
void should_NotDeleteHistoryEvents_When_TaskIsDeleted_With_HistoryDeletionDisabled()
|
||||
throws Exception {
|
||||
|
||||
final String taskId = "TKI:000000000000000000000000000000000039";
|
||||
|
@ -130,7 +130,7 @@ class DeleteHistoryEventsOnTaskDeletionAccTest extends AbstractAccTest {
|
|||
|
||||
@Test
|
||||
@WithAccessId(user = "admin")
|
||||
void should_notDeleteHistoryEvents_When_TasksAreDeleted_With_HistoryDeletionDisabled()
|
||||
void should_NotDeleteHistoryEvents_When_TasksAreDeleted_With_HistoryDeletionDisabled()
|
||||
throws Exception {
|
||||
final String taskId_1 = "TKI:000000000000000000000000000000000040";
|
||||
final String taskId_2 = "TKI:000000000000000000000000000000000068";
|
||||
|
|
|
@ -38,7 +38,7 @@ class TaskHistoryQueryImplTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_returnList_When_CallingListMethodOnTaskHistoryQuery() throws Exception {
|
||||
void should_ReturnList_When_CallingListMethodOnTaskHistoryQuery() throws Exception {
|
||||
List<TaskHistoryEvent> returnList = new ArrayList<>();
|
||||
returnList.add(createHistoryEvent("abcd", "T22", "car", "BV", "this was important", null));
|
||||
TimeInterval interval = new TimeInterval(Instant.now().minusNanos(1000), Instant.now());
|
||||
|
|
|
@ -224,7 +224,7 @@ class CreateClassificationAccTest extends AbstractAccTest {
|
|||
|
||||
@WithAccessId(user = "businessadmin")
|
||||
@Test
|
||||
void should_beAbleToCreateNewClassification_When_ClassificationCopy() throws Exception {
|
||||
void should_BeAbleToCreateNewClassification_When_ClassificationCopy() throws Exception {
|
||||
ClassificationImpl oldClassification =
|
||||
(ClassificationImpl) classificationService.getClassification("T2100", "DOMAIN_B");
|
||||
Classification newClassification = oldClassification.copy("T9949");
|
||||
|
|
|
@ -53,7 +53,7 @@ class GetTaskIdsOfClassificationCategoryReportAccTest extends AbstractReportAccT
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@TestFactory
|
||||
Stream<DynamicTest> should_NotThrowError_When_buildReportForTaskState() {
|
||||
Stream<DynamicTest> should_NotThrowError_When_BuildReportForTaskState() {
|
||||
Iterator<TaskTimestamp> iterator = Arrays.stream(TaskTimestamp.values()).iterator();
|
||||
|
||||
ThrowingConsumer<TaskTimestamp> test =
|
||||
|
@ -71,7 +71,7 @@ class GetTaskIdsOfClassificationCategoryReportAccTest extends AbstractReportAccT
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_selectCompletedItems_When_CompletedTimeStampIsRequested() throws Exception {
|
||||
void should_SelectCompletedItems_When_CompletedTimeStampIsRequested() throws Exception {
|
||||
final List<TimeIntervalColumnHeader> columnHeaders =
|
||||
Collections.singletonList(new TimeIntervalColumnHeader(0));
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ class GetTaskIdsOfClassificationReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@TestFactory
|
||||
Stream<DynamicTest> should_NotThrowError_When_buildReportForTaskState() {
|
||||
Stream<DynamicTest> should_NotThrowError_When_BuildReportForTaskState() {
|
||||
Iterator<TaskTimestamp> iterator = Arrays.stream(TaskTimestamp.values()).iterator();
|
||||
|
||||
ThrowingConsumer<TaskTimestamp> test =
|
||||
|
@ -69,7 +69,7 @@ class GetTaskIdsOfClassificationReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_selectCompletedItems_When_CompletedTimeStampIsRequested() throws Exception {
|
||||
void should_SelectCompletedItems_When_CompletedTimeStampIsRequested() throws Exception {
|
||||
List<TimeIntervalColumnHeader> columnHeaders = getListOfColumnHeaders();
|
||||
List<SelectedItem> selectedItems = Arrays.asList(L_10000, L_10000_1, L_30000);
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ class GetTaskIdsOfTaskCustomFieldValueReportAccTest extends AbstractReportAccTes
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@TestFactory
|
||||
Stream<DynamicTest> should_NotThrowError_When_buildReportForTaskState() {
|
||||
Stream<DynamicTest> should_NotThrowError_When_BuildReportForTaskState() {
|
||||
Iterator<TaskTimestamp> iterator = Arrays.stream(TaskTimestamp.values()).iterator();
|
||||
|
||||
ThrowingConsumer<TaskTimestamp> test =
|
||||
|
@ -74,7 +74,7 @@ class GetTaskIdsOfTaskCustomFieldValueReportAccTest extends AbstractReportAccTes
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_selectCompletedItems_When_CompletedTimeStampIsRequested() throws Exception {
|
||||
void should_SelectCompletedItems_When_CompletedTimeStampIsRequested() throws Exception {
|
||||
List<TimeIntervalColumnHeader> columnHeaders = getListOfColumnHeaders();
|
||||
List<SelectedItem> selectedItems =
|
||||
Collections
|
||||
|
|
|
@ -49,7 +49,7 @@ class GetTaskIdsOfWorkbasketReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@TestFactory
|
||||
Stream<DynamicTest> should_NotThrowError_When_buildReportForTaskState() {
|
||||
Stream<DynamicTest> should_NotThrowError_When_BuildReportForTaskState() {
|
||||
Iterator<TaskTimestamp> iterator = Arrays.stream(TaskTimestamp.values()).iterator();
|
||||
|
||||
ThrowingConsumer<TaskTimestamp> test =
|
||||
|
@ -67,7 +67,7 @@ class GetTaskIdsOfWorkbasketReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_selectCompletedItems_When_CompletedTimeStampIsRequested() throws Exception {
|
||||
void should_SelectCompletedItems_When_CompletedTimeStampIsRequested() throws Exception {
|
||||
final List<TimeIntervalColumnHeader> columnHeaders = getListOfColumnHeaders();
|
||||
final List<SelectedItem> selectedItems = Arrays.asList(S_1, S_2, S_3);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class ProvideClassificationCategoryReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_augmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
void should_AugmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
ClassificationCategoryReport report =
|
||||
MONITOR_SERVICE.createClassificationCategoryReportBuilder().buildReport();
|
||||
|
||||
|
@ -141,7 +141,7 @@ class ProvideClassificationCategoryReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@TestFactory
|
||||
Stream<DynamicTest> should_NotThrowError_When_buildReportForTaskState() {
|
||||
Stream<DynamicTest> should_NotThrowError_When_BuildReportForTaskState() {
|
||||
Iterator<TaskTimestamp> iterator = Arrays.stream(TaskTimestamp.values()).iterator();
|
||||
ThrowingConsumer<TaskTimestamp> test =
|
||||
timestamp -> {
|
||||
|
@ -157,7 +157,7 @@ class ProvideClassificationCategoryReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_computeNumbersAccordingToPlannedDate_When_BuildReportForPlanned() throws Exception {
|
||||
void should_ComputeNumbersAccordingToPlannedDate_When_BuildReportForPlanned() throws Exception {
|
||||
List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
|
||||
|
||||
ClassificationCategoryReport report =
|
||||
|
|
|
@ -43,7 +43,7 @@ class ProvideClassificationReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_augmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
void should_AugmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
ClassificationReport report = MONITOR_SERVICE.createClassificationReportBuilder().buildReport();
|
||||
|
||||
assertThat(report.getRows()).hasSize(5);
|
||||
|
@ -151,7 +151,7 @@ class ProvideClassificationReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@TestFactory
|
||||
Stream<DynamicTest> should_NotThrowError_When_buildReportForTaskState() {
|
||||
Stream<DynamicTest> should_NotThrowError_When_BuildReportForTaskState() {
|
||||
Iterator<TaskTimestamp> iterator = Arrays.stream(TaskTimestamp.values()).iterator();
|
||||
ThrowingConsumer<TaskTimestamp> test =
|
||||
timestamp -> {
|
||||
|
@ -164,7 +164,7 @@ class ProvideClassificationReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_computeNumbersAccordingToPlannedDate_When_BuildReportForPlanned() throws Exception {
|
||||
void should_ComputeNumbersAccordingToPlannedDate_When_BuildReportForPlanned() throws Exception {
|
||||
List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
|
||||
|
||||
ClassificationReport report =
|
||||
|
|
|
@ -71,7 +71,7 @@ class ProvideDetailedClassificationReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_augmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
void should_AugmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
DetailedClassificationReport report =
|
||||
MONITOR_SERVICE.createClassificationReportBuilder().buildDetailedReport();
|
||||
|
||||
|
@ -181,7 +181,7 @@ class ProvideDetailedClassificationReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@TestFactory
|
||||
Stream<DynamicTest> should_NotThrowError_When_buildReportForTaskState() {
|
||||
Stream<DynamicTest> should_NotThrowError_When_BuildReportForTaskState() {
|
||||
Iterator<TaskTimestamp> iterator = Arrays.stream(TaskTimestamp.values()).iterator();
|
||||
ThrowingConsumer<TaskTimestamp> test =
|
||||
timestamp -> {
|
||||
|
@ -255,7 +255,7 @@ class ProvideDetailedClassificationReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_computeNumbersAccordingToPlannedDate_When_BuildReportForPlanned() throws Exception {
|
||||
void should_ComputeNumbersAccordingToPlannedDate_When_BuildReportForPlanned() throws Exception {
|
||||
List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
|
||||
|
||||
DetailedClassificationReport report =
|
||||
|
|
|
@ -48,7 +48,7 @@ class ProvideTaskCustomFieldValueReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_augmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
void should_AugmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
TaskCustomFieldValueReport report =
|
||||
MONITOR_SERVICE
|
||||
.createTaskCustomFieldValueReportBuilder(TaskCustomField.CUSTOM_1)
|
||||
|
@ -131,7 +131,7 @@ class ProvideTaskCustomFieldValueReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@TestFactory
|
||||
Stream<DynamicTest> should_NotThrowError_When_buildReportForTaskState() {
|
||||
Stream<DynamicTest> should_NotThrowError_When_BuildReportForTaskState() {
|
||||
Iterator<TaskTimestamp> iterator = Arrays.stream(TaskTimestamp.values()).iterator();
|
||||
ThrowingConsumer<TaskTimestamp> test =
|
||||
timestamp -> {
|
||||
|
@ -172,7 +172,7 @@ class ProvideTaskCustomFieldValueReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_computeNumbersAccordingToPlannedDate_When_BuildReportForPlanned() throws Exception {
|
||||
void should_ComputeNumbersAccordingToPlannedDate_When_BuildReportForPlanned() throws Exception {
|
||||
List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
|
||||
|
||||
TaskCustomFieldValueReport report =
|
||||
|
|
|
@ -59,7 +59,7 @@ class ProvideTaskStatusReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_augmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
void should_AugmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
TaskStatusReport report = MONITOR_SERVICE.createTaskStatusReportBuilder().buildReport();
|
||||
|
||||
assertThat(report.getRows()).hasSize(3);
|
||||
|
|
|
@ -28,7 +28,7 @@ class ProvideTimestampReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_augmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
void should_AugmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
TimestampReport report = MONITOR_SERVICE.createTimestampReportBuilder().buildReport();
|
||||
assertThat(report.getRows()).hasSize(2);
|
||||
assertThat(report.getRow("CREATED").getDisplayName()).isEqualTo("CREATED");
|
||||
|
|
|
@ -44,7 +44,7 @@ class ProvideWorkbasketReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_augmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
void should_AugmentDisplayNames_When_ReportIsBuild() throws Exception {
|
||||
WorkbasketReport report = MONITOR_SERVICE.createWorkbasketReportBuilder().buildReport();
|
||||
assertThat(report.getRows()).hasSize(3);
|
||||
assertThat(report.getRow("USER-1-1").getDisplayName()).isEqualTo("PPK User 1 KSC 1");
|
||||
|
@ -113,7 +113,7 @@ class ProvideWorkbasketReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@TestFactory
|
||||
Stream<DynamicTest> should_NotThrowError_When_buildReportForTaskState() {
|
||||
Stream<DynamicTest> should_NotThrowError_When_BuildReportForTaskState() {
|
||||
Iterator<TaskTimestamp> iterator = Arrays.stream(TaskTimestamp.values()).iterator();
|
||||
ThrowingConsumer<TaskTimestamp> test =
|
||||
timestamp -> {
|
||||
|
@ -151,7 +151,7 @@ class ProvideWorkbasketReportAccTest extends AbstractReportAccTest {
|
|||
|
||||
@WithAccessId(user = "monitor")
|
||||
@Test
|
||||
void should_computeNumbersAccordingToPlannedDate_When_BuildReportForPlanned() throws Exception {
|
||||
void should_ComputeNumbersAccordingToPlannedDate_When_BuildReportForPlanned() throws Exception {
|
||||
List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
|
||||
|
||||
WorkbasketReport report =
|
||||
|
|
|
@ -43,7 +43,7 @@ class CreateTaskAccTest extends AbstractAccTest {
|
|||
|
||||
@WithAccessId(user = "user-1-1")
|
||||
@Test
|
||||
void should_beAbleToCreateNewTask_When_TaskCopy() throws Exception {
|
||||
void should_BeAbleToCreateNewTask_When_TaskCopy() throws Exception {
|
||||
Task oldTask = taskService.getTask("TKI:000000000000000000000000000000000000");
|
||||
|
||||
Task newTask = oldTask.copy();
|
||||
|
@ -91,7 +91,7 @@ class CreateTaskAccTest extends AbstractAccTest {
|
|||
|
||||
@WithAccessId(user = "user-1-1")
|
||||
@Test
|
||||
void should_createTask_When_ObjectReferenceSystemAndSystemInstanceIsNull() throws Exception {
|
||||
void should_CreateTask_When_ObjectReferenceSystemAndSystemInstanceIsNull() throws Exception {
|
||||
|
||||
String currentUser = CurrentUserContext.getUserid();
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class DeleteTaskAccTest extends AbstractAccTest {
|
|||
|
||||
@WithAccessId(user = "admin")
|
||||
@Test
|
||||
void should_deleteAttachments_When_MultipleTasksAreDeleted() throws Exception {
|
||||
void should_DeleteAttachments_When_MultipleTasksAreDeleted() throws Exception {
|
||||
|
||||
TaskService taskService = taskanaEngine.getTaskService();
|
||||
|
||||
|
@ -88,7 +88,7 @@ class DeleteTaskAccTest extends AbstractAccTest {
|
|||
|
||||
@WithAccessId(user = "admin")
|
||||
@Test
|
||||
void should_deleteAttachments_When_SingleTaskIsDeleted() throws Exception {
|
||||
void should_DeleteAttachments_When_SingleTaskIsDeleted() throws Exception {
|
||||
|
||||
TaskService taskService = taskanaEngine.getTaskService();
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ import pro.taskana.task.api.models.Task;
|
|||
class SelectAndClaimTaskAccTest extends AbstractAccTest {
|
||||
|
||||
@Test
|
||||
void should_claimDifferentTasks_For_ConcurrentSelectAndClaimCalls() throws Exception {
|
||||
void should_ClaimDifferentTasks_For_ConcurrentSelectAndClaimCalls() throws Exception {
|
||||
|
||||
List<Task> selectedAndClaimedTasks = Collections.synchronizedList(new ArrayList<>());
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ class ServiceLevelPriorityAccTest extends AbstractAccTest {
|
|||
|
||||
@WithAccessId(user = "user-1-1")
|
||||
@Test
|
||||
void should_calculateDueDateAtCreate() throws Exception {
|
||||
void should_CalculateDueDateAtCreate() throws Exception {
|
||||
|
||||
// P16D
|
||||
Classification classification = classificationService.getClassification("L110105", "DOMAIN_A");
|
||||
|
@ -587,7 +587,7 @@ class ServiceLevelPriorityAccTest extends AbstractAccTest {
|
|||
|
||||
@WithAccessId(user = "user-1-1")
|
||||
@Test
|
||||
void should_notThrowServiceLevelViolation_IfWeekendOrHolidaysBetweenDates() throws Exception {
|
||||
void should_NotThrowServiceLevelViolation_IfWeekendOrHolidaysBetweenDates() throws Exception {
|
||||
Task task = taskService.getTask("TKI:000000000000000000000000000000000002"); // P1D
|
||||
|
||||
// SLA is broken but only with holidays in between
|
||||
|
|
|
@ -76,7 +76,7 @@ class CreateWorkbasketAccTest extends AbstractAccTest {
|
|||
|
||||
@WithAccessId(user = "businessadmin")
|
||||
@Test
|
||||
void should_beAbleToCreateNewWorkbasket_When_WorkbasketCopy() throws Exception {
|
||||
void should_BeAbleToCreateNewWorkbasket_When_WorkbasketCopy() throws Exception {
|
||||
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
|
||||
Workbasket oldWorkbasket = workbasketService.getWorkbasket("GPK_KSC", "DOMAIN_A");
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class TaskanaEngineConfigurationTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_returnTheTwoCustomHolidays_When_twoCustomHolidaysAreConfiguredInThePropertiesFile()
|
||||
void should_ReturnTheTwoCustomHolidays_When_TwoCustomHolidaysAreConfiguredInThePropertiesFile()
|
||||
throws Exception {
|
||||
DataSource ds = TaskanaEngineTestConfiguration.getDataSource();
|
||||
TaskanaEngineConfiguration taskEngineConfiguration =
|
||||
|
@ -55,7 +55,7 @@ class TaskanaEngineConfigurationTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_returnEmptyCustomHolidaysList_When_allCustomHolidaysAreInWrongFormatInPropertiesFile()
|
||||
void should_ReturnEmptyCustomHolidaysList_When_AllCustomHolidaysAreInWrongFormatInPropertiesFile()
|
||||
throws Exception {
|
||||
DataSource ds = TaskanaEngineTestConfiguration.getDataSource();
|
||||
TaskanaEngineConfiguration taskEngineConfiguration =
|
||||
|
|
|
@ -78,7 +78,7 @@ class AccessIdControllerIntTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_returnEmptyResults_ifInvalidCharacterIsUsedInCondition() {
|
||||
void should_ReturnEmptyResults_ifInvalidCharacterIsUsedInCondition() {
|
||||
ResponseEntity<AccessIdListResource> response =
|
||||
TEMPLATE.exchange(
|
||||
restHelper.toUrl(Mapping.URL_ACCESSID) + "?search-for=ksc-teamleads,cn=groups",
|
||||
|
@ -104,7 +104,7 @@ class AccessIdControllerIntTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_returnAccessIdWithUmlauten_ifBased64EncodedUserIsLookedUp() {
|
||||
void should_ReturnAccessIdWithUmlauten_ifBased64EncodedUserIsLookedUp() {
|
||||
ResponseEntity<List<AccessIdRepresentationModel>> response =
|
||||
TEMPLATE.exchange(
|
||||
restHelper.toUrl(Mapping.URL_ACCESSID) + "?search-for=läf",
|
||||
|
@ -135,7 +135,7 @@ class AccessIdControllerIntTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_returnAccessIdsOfGroupsTheAccessIdIsMemberOf_ifAccessIdOfUserIsGiven() {
|
||||
void should_ReturnAccessIdsOfGroupsTheAccessIdIsMemberOf_ifAccessIdOfUserIsGiven() {
|
||||
ResponseEntity<List<AccessIdRepresentationModel>> response =
|
||||
TEMPLATE.exchange(
|
||||
restHelper.toUrl(Mapping.URL_ACCESSID_GROUPS) + "?access-id=teamlead-2",
|
||||
|
@ -156,7 +156,7 @@ class AccessIdControllerIntTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_returnBadRequest_ifAccessIdOfUserContainsInvalidCharacter() {
|
||||
void should_ReturnBadRequest_ifAccessIdOfUserContainsInvalidCharacter() {
|
||||
ThrowingCallable call =
|
||||
() ->
|
||||
TEMPLATE.exchange(
|
||||
|
@ -173,7 +173,7 @@ class AccessIdControllerIntTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_returnAccessIdsOfGroupsTheAccessIdIsMemberOf_ifAccessIdOfGroupIsGiven() {
|
||||
void should_ReturnAccessIdsOfGroupsTheAccessIdIsMemberOf_ifAccessIdOfGroupIsGiven() {
|
||||
ResponseEntity<List<AccessIdRepresentationModel>> response =
|
||||
TEMPLATE.exchange(
|
||||
restHelper.toUrl(Mapping.URL_ACCESSID_GROUPS)
|
||||
|
@ -191,7 +191,7 @@ class AccessIdControllerIntTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_throwNotAuthorizedException_ifCallerOfGroupRetrievalIsNotAdminOrBusinessAdmin() {
|
||||
void should_ThrowNotAuthorizedException_ifCallerOfGroupRetrievalIsNotAdminOrBusinessAdmin() {
|
||||
ThrowingCallable call =
|
||||
() ->
|
||||
TEMPLATE.exchange(
|
||||
|
@ -207,7 +207,7 @@ class AccessIdControllerIntTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_throwNotAuthorizedException_ifCallerOfValidationIsNotAdminOrBusinessAdmin() {
|
||||
void should_ThrowNotAuthorizedException_ifCallerOfValidationIsNotAdminOrBusinessAdmin() {
|
||||
ThrowingCallable call =
|
||||
() ->
|
||||
TEMPLATE.exchange(
|
||||
|
|
|
@ -33,7 +33,7 @@ import pro.taskana.common.internal.util.CheckedBiConsumer;
|
|||
class QueryHelperTest {
|
||||
|
||||
@Test
|
||||
void should_removeSortByAndOrderDirection_When_ApplyingSortingParams() throws Exception {
|
||||
void should_RemoveSortByAndOrderDirection_When_ApplyingSortingParams() throws Exception {
|
||||
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
|
||||
map.put(QueryHelper.SORT_BY, Collections.singletonList("sort-by"));
|
||||
map.put(QueryHelper.ORDER_DIRECTION, Collections.singletonList("order"));
|
||||
|
@ -43,7 +43,7 @@ class QueryHelperTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_ignoreMapContent_When_ApplyingSortingParams() throws Exception {
|
||||
void should_IgnoreMapContent_When_ApplyingSortingParams() throws Exception {
|
||||
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
|
||||
String key = "unknown";
|
||||
List<String> value = Collections.singletonList("sort-by");
|
||||
|
@ -107,7 +107,7 @@ class QueryHelperTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_callConsumerMultipleTimes_When_MapContainsMultipleSortBy() throws Exception {
|
||||
void should_CallConsumerMultipleTimes_When_MapContainsMultipleSortBy() throws Exception {
|
||||
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
|
||||
map.put(QueryHelper.SORT_BY, Arrays.asList("sort-by-value1", "sort-by-value2"));
|
||||
MockBiConsumer consumer = mock(MockBiConsumer.class);
|
||||
|
@ -120,7 +120,7 @@ class QueryHelperTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_matchSortDirectionForEachSortBy_When_MapContainsMultipleSortByAndOrderBy()
|
||||
void should_MatchSortDirectionForEachSortBy_When_MapContainsMultipleSortByAndOrderBy()
|
||||
throws Exception {
|
||||
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
|
||||
map.put(QueryHelper.SORT_BY, Arrays.asList("sort-by-value1", "sort-by-value2"));
|
||||
|
@ -134,7 +134,7 @@ class QueryHelperTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_throwError_When_MapContainsOrderByButNoSortBy() {
|
||||
void should_ThrowError_When_MapContainsOrderByButNoSortBy() {
|
||||
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
|
||||
map.put(QueryHelper.ORDER_DIRECTION, Collections.singletonList("desc"));
|
||||
assertThatThrownBy(() -> applyAndRemoveSortingParams(map, mock(MockBiConsumer.class)))
|
||||
|
@ -142,7 +142,7 @@ class QueryHelperTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_throwError_When_SortByAndOrderByCountDoesNotMatch() {
|
||||
void should_ThrowError_When_SortByAndOrderByCountDoesNotMatch() {
|
||||
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
|
||||
map.put(QueryHelper.SORT_BY, Arrays.asList("1", "2"));
|
||||
map.put(QueryHelper.ORDER_DIRECTION, Collections.singletonList("desc"));
|
||||
|
@ -151,7 +151,7 @@ class QueryHelperTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_throwError_When_ConsumerRaisesException() throws Exception {
|
||||
void should_ThrowError_When_ConsumerRaisesException() throws Exception {
|
||||
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
|
||||
map.put(QueryHelper.SORT_BY, Collections.singletonList("1"));
|
||||
MockBiConsumer consumer = mock(MockBiConsumer.class);
|
||||
|
@ -161,13 +161,13 @@ class QueryHelperTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_throwError_When_ConsumerIsNull() {
|
||||
void should_ThrowError_When_ConsumerIsNull() {
|
||||
assertThatThrownBy(() -> applyAndRemoveSortingParams(new LinkedMultiValueMap<>(), null))
|
||||
.isInstanceOf(InvalidArgumentException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_throwError_When_MapIsNull() {
|
||||
void should_ThrowError_When_MapIsNull() {
|
||||
assertThatThrownBy(() -> applyAndRemoveSortingParams(null, mock(MockBiConsumer.class)))
|
||||
.isInstanceOf(InvalidArgumentException.class);
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ class WorkbasketAccessItemControllerIntTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_deleteAllAccessItemForUser_ifValidAccessIdOfUserIsSupplied() {
|
||||
void should_DeleteAllAccessItemForUser_ifValidAccessIdOfUserIsSupplied() {
|
||||
|
||||
String parameters = "?access-id=teamlead-2";
|
||||
ResponseEntity<Void> response =
|
||||
|
@ -134,7 +134,7 @@ class WorkbasketAccessItemControllerIntTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_returnBadRequest_ifAccessIdIsSubStringOfUser() {
|
||||
void should_ReturnBadRequest_ifAccessIdIsSubStringOfUser() {
|
||||
String parameters = "?access-id=user-1";
|
||||
ThrowingCallable httpCall =
|
||||
() ->
|
||||
|
@ -150,7 +150,7 @@ class WorkbasketAccessItemControllerIntTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_returnBadRequest_ifAccessIdIsGroup() {
|
||||
void should_ReturnBadRequest_ifAccessIdIsGroup() {
|
||||
String parameters = "?access-id=cn=monitor-users,cn=groups,ou=test,o=taskana";
|
||||
ThrowingCallable httpCall =
|
||||
() ->
|
||||
|
@ -166,7 +166,7 @@ class WorkbasketAccessItemControllerIntTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void should_returnBadRequest_ifAccessIdIsOrganizationalGroup() {
|
||||
void should_ReturnBadRequest_ifAccessIdIsOrganizationalGroup() {
|
||||
String parameters = "?access-id=cn=organisationseinheit ksc,cn=organisation,ou=test,o=taskana";
|
||||
ThrowingCallable httpCall =
|
||||
() ->
|
||||
|
|
Loading…
Reference in New Issue