From 86d8f37c983f9dd4ec9e88656fdc2de4b56d222d Mon Sep 17 00:00:00 2001 From: Jan Bernitt Date: Thu, 10 Oct 2024 10:29:30 +0200 Subject: [PATCH] chore: move and rename http client test API (#18791) --- .../HttpAssertions.java} | 118 ++++-------------- .../HttpClientAdapter.java} | 45 ++++--- .../org/hisp/dhis/http/HttpClientUtils.java | 96 ++++++++++++++ .../dhis/{test/web => http}/HttpMethod.java | 2 +- .../dhis/{test/web => http}/HttpStatus.java | 2 +- .../org/hisp/dhis/test/webapi/Assertions.java | 6 +- .../webapi/ControllerIntegrationTestBase.java | 16 +-- .../ControllerWithApiTokenAuthTestBase.java | 4 +- .../AbstractCrudControllerTest.java | 12 +- .../AbstractDataValueControllerTest.java | 25 ++-- .../AbstractDatastoreControllerTest.java | 4 +- .../AbstractGistControllerTest.java | 6 +- .../AbstractUserDatastoreControllerTest.java | 4 +- .../controller/AccountControllerTest.java | 4 +- ...alyticsOutlierDetectionControllerTest.java | 2 +- .../AnalyticsTableHookControllerTest.java | 4 +- .../webapi/controller/AppControllerTest.java | 2 +- .../controller/AppHubControllerTest.java | 2 +- .../controller/AttributeControllerTest.java | 4 +- .../BulkPatchSharingControllerTest.java | 4 +- .../CategoryComboControllerTest.java | 2 +- ...tegoryComboModificationControllerTest.java | 6 +- .../controller/CategoryControllerTest.java | 2 +- .../CategoryOptionComboControllerTest.java | 2 +- .../CategoryOptionControllerTest.java | 2 +- .../controller/ChangeLogControllerTest.java | 4 +- ...leteDataSetRegistrationControllerTest.java | 10 +- .../CrudControllerIntegrationTest.java | 4 +- .../controller/CrudControllerPagingTest.java | 2 +- .../controller/DashboardControllerTest.java | 2 +- .../DataApprovalControllerTest.java | 4 +- .../controller/DataElementControllerTest.java | 2 +- .../controller/DataSetControllerTest.java | 4 +- .../DataSetMetadataControllerTest.java | 2 +- .../controller/DataValueControllerTest.java | 8 +- .../DataValueFileResourceControllerTest.java | 6 +- .../DataValueMultiTextControllerTest.java | 4 +- .../DataValueSetControllerTest.java | 10 +- ...storeControllerAndroidSettingsAppTest.java | 4 +- ...ControllerAppAdditionalNamespacesTest.java | 4 +- .../DatastoreControllerAppTest.java | 4 +- .../DatastoreControllerIntegrationTest.java | 4 +- .../controller/DatastoreControllerTest.java | 8 +- .../DatastoreFieldsControllerTest.java | 2 +- .../DatastoreFilterControllerTest.java | 2 +- ...astoreUpdateControllerIntegrationTest.java | 10 +- .../controller/DimensionControllerTest.java | 4 +- .../controller/EmailControllerTest.java | 2 +- ...nrollmentQueryAnalyticsControllerTest.java | 4 +- .../controller/EventChartControllerTest.java | 4 +- .../controller/EventHookControllerTest.java | 4 +- .../EventQueryAnalyticsControllerTest.java | 4 +- .../controller/EventReportControllerTest.java | 8 +- .../EventVisualizationControllerTest.java | 10 +- .../webapi/controller/FileControllerTest.java | 6 +- .../FileResourceControllerTest.java | 2 +- .../FollowupAnalysisControllerTest.java | 4 +- .../controller/GeoFeatureControllerTest.java | 2 +- .../GeoJsonImportControllerTest.java | 4 +- .../GistAttributeControllerTest.java | 4 +- .../controller/GistCsvControllerTest.java | 2 +- .../controller/GistFieldsControllerTest.java | 4 +- .../controller/GistFilterControllerTest.java | 2 +- .../controller/GistPagerControllerTest.java | 2 +- .../GistPostgresControllerTest.java | 6 +- .../GistValidationControllerTest.java | 4 +- .../IdentifiableObjectControllerTest.java | 4 +- .../controller/IndicatorControllerTest.java | 2 +- .../InterpretationControllerTest.java | 8 +- .../JobConfigurationControllerTest.java | 4 +- ...bConfigurationRunErrorsControllerTest.java | 4 +- .../JobSchedulerControllerTest.java | 4 +- .../controller/LegendSetControllerTest.java | 4 +- .../controller/LocaleControllerTest.java | 4 +- .../LockExceptionControllerTest.java | 4 +- .../controller/LoginConfigControllerTest.java | 6 +- .../controller/MaintenanceControllerTest.java | 4 +- .../webapi/controller/MapControllerTest.java | 4 +- .../webapi/controller/MeControllerTest.java | 12 +- .../MessageConversationControllerTest.java | 4 +- .../MetadataFilterControllerTest.java | 4 +- ...ImportExportControllerIntegrationTest.java | 6 +- .../MetadataImportExportControllerTest.java | 6 +- .../MetadataWorkflowControllerTest.java | 8 +- .../MinMaxDataElementControllerTest.java | 4 +- .../controller/OpenApiControllerTest.java | 2 +- .../controller/OptionControllerTest.java | 4 +- .../controller/OptionGroupControllerTest.java | 4 +- .../OrganisationUnitControllerTest.java | 9 +- .../OrganisationUnitGroupControllerTest.java | 4 +- ...rganisationUnitLocationControllerTest.java | 4 +- .../controller/PdfFormControllerTest.java | 2 +- .../controller/PeriodTypeControllerTest.java | 2 +- .../controller/PredictionControllerTest.java | 2 +- .../controller/PredictorControllerTest.java | 4 +- .../ProgramControllerIntegrationTest.java | 4 +- .../controller/ProgramControllerTest.java | 4 +- .../ProgramIndicatorControllerTest.java | 6 +- .../ProgramMessageControllerTest.java | 2 +- .../ProgramRuleActionControllerTest.java | 4 +- .../controller/ProgramRuleControllerTest.java | 4 +- .../ProgramSectionControllerTest.java | 4 +- .../ProgramStageControllerTest.java | 4 +- .../controller/QueryControllerTest.java | 4 +- .../RelationshipTypeControllerTest.java | 4 +- .../controller/RequestInfoControllerTest.java | 2 +- .../ResourceTableControllerTest.java | 2 +- .../controller/SchemaBasedControllerTest.java | 8 +- .../controller/SchemaControllerTest.java | 2 +- .../controller/SharingControllerTest.java | 4 +- .../controller/SmsCommandControllerTest.java | 2 +- .../controller/SmsGatewayControllerTest.java | 4 +- .../controller/SmsInboundControllerTest.java | 2 +- .../controller/SmsOutboundControllerTest.java | 2 +- .../controller/SqlViewControllerTest.java | 4 +- .../SynchronizationControllerTest.java | 6 +- .../controller/SystemControllerTest.java | 2 +- .../SystemSettingsControllerTest.java | 10 +- .../TrackedEntityAttributeControllerTest.java | 2 +- .../controller/TwoFactorControllerTest.java | 4 +- .../controller/UserAccountControllerTest.java | 2 +- .../webapi/controller/UserControllerTest.java | 10 +- .../controller/UserLookupControllerTest.java | 4 +- .../controller/ValidationControllerTest.java | 2 +- .../ValidationRuleControllerTest.java | 2 +- .../VisualizationControllerTest.java | 8 +- .../TrackedEntityAttributeControllerTest.java | 4 +- .../AbstractDataIntegrityIntegrationTest.java | 6 +- ...DataIntegrityCategoriesControllerTest.java | 4 +- ...ityCategoriesDuplicatedControllerTest.java | 4 +- ...ityCategoryComboInvalidControllerTest.java | 4 +- ...rityCategoryComboUnusedControllerTest.java | 4 +- ...egrityCategoryNoOptionsControllerTest.java | 4 +- ...goryOptionComboDisjointControllerTest.java | 4 +- ...ryOptionComboNoCatComboControllerTest.java | 4 +- ...onComboWrongCardinalityControllerTest.java | 4 +- ...etExcessGroupMembershipControllerTest.java | 4 +- ...ptionGroupSetIncompleteControllerTest.java | 4 +- ...ategoryOptionNoCategoryControllerTest.java | 4 +- ...tyDataElementsAbandonedControllerTest.java | 8 +- ...teExcessGroupMembershipControllerTest.java | 4 +- ...teNotInDataElementGroupControllerTest.java | 4 +- ...entsAggregationOperatorControllerTest.java | 4 +- ...ntsDifferentPeriodTypesControllerTest.java | 4 +- ...yDataElementsNoAnalysisControllerTest.java | 4 +- ...grityDataElementsNoDataControllerTest.java | 8 +- ...ataIntegrityDataElementsNoDatasetTest.java | 4 +- ...aIntegrityDatasetsEmptyControllerTest.java | 4 +- ...grityDatasetsNoOrgUnitsControllerTest.java | 4 +- .../DataIntegrityDefaultChecksTest.java | 4 +- .../DataIntegrityDetailsControllerTest.java | 4 +- ...eCategoryOptionGroupSetControllerTest.java | 4 +- ...izeCategoryOptionGroupsControllerTest.java | 4 +- ...upSizeDataElementGroupsControllerTest.java | 4 +- ...pSizeIndicatorGroupSetsControllerTest.java | 4 +- ...roupSizeIndicatorGroupsControllerTest.java | 4 +- ...eOrganisationUnitGroupsControllerTest.java | 4 +- ...rityGroupSizeUserGroupsControllerTest.java | 4 +- ...izeValidationRuleGroupsControllerTest.java | 4 +- ...catorsDuplicatedFactorsControllerTest.java | 4 +- ...dicatorsDuplicatedTermsControllerTest.java | 4 +- ...dicatorsExactDuplicatesControllerTest.java | 4 +- ...ityIndicatorsNoAnalysisControllerTest.java | 4 +- ...ityIndicatorsNotGroupedControllerTest.java | 4 +- ...atingExclusiveGroupSetsControllerTest.java | 4 +- ...taIntegrityOptionGroupsWithoutOptions.java | 4 +- ...grityOptionSetNoOptionsControllerTest.java | 4 +- ...egrityOptionSetsNotUsedControllerTest.java | 4 +- ...ptionSetsWrongSortOrderControllerTest.java | 4 +- ...tionUnitCompulsoryGroupControllerTest.java | 4 +- ...isationUnitExcessGroupsControllerTest.java | 4 +- ...UnitNamesMultipleSpacesControllerTest.java | 4 +- ...anisationUnitNullIslandControllerTest.java | 4 +- ...ationUnitOpenClosedDateControllerTest.java | 4 +- ...ionUnitsInvalidGeometryControllerTest.java | 4 +- ...ationUnitsMultipleRootsControllerTest.java | 4 +- ...nisationUnitsNoGeometryControllerTest.java | 4 +- ...ganisationUnitsNoGroupsControllerTest.java | 4 +- ...itsNotContainedByParentControllerTest.java | 4 +- ...nUnitsSameNameAndParentControllerTest.java | 4 +- ...tionUnitsTrailingSpacesControllerTest.java | 4 +- ...rphanedOrganisationUnitControllerTest.java | 4 +- ...ushAnalysisNoRecipientsControllerTest.java | 4 +- .../DataIntegrityReportControllerTest.java | 23 +++- ...tegoryOptionsInCatComboControllerTest.java | 4 +- .../DataIntegritySummaryControllerTest.java | 4 +- .../DataIntegrityUserRolesNoAuthorities.java | 4 +- .../DataIntegrityUserRolesNoUsers.java | 4 +- ...CaptureOrgUnitNotInTeiSearchHierarchy.java | 4 +- ...grityUsersCaptureOrgunitNotInDataView.java | 4 +- ...ionRulesMissingStrategyControllerTest.java | 4 +- ...ationRulesWithoutGroupsControllerTest.java | 4 +- .../DeduplicationControllerTest.java | 4 +- ...ramNotificationInstanceControllerTest.java | 2 +- ...ramNotificationTemplateControllerTest.java | 2 +- .../controller/icon/IconControllerTest.java | 2 +- .../MetadataImportIntegrationTest.java | 2 +- ...ProgramStageWorkingListControllerTest.java | 4 +- .../AuthenticationControllerTest.java | 2 +- .../ImpersonateUserControllerTest.java | 2 +- .../ExportControllerPaginationTest.java | 2 +- .../EnrollmentsExportControllerTest.java | 2 +- .../event/EventsExportControllerByIdTest.java | 4 +- .../EventsExportControllerPostgresTest.java | 2 +- .../event/EventsExportControllerTest.java | 2 +- .../RelationshipsExportControllerTest.java | 2 +- ...dEntitiesExportControllerPostgresTest.java | 2 +- .../TrackedEntitiesExportControllerTest.java | 4 +- .../TrackerCreateRelationshipSMSTest.java | 2 +- .../imports/TrackerEnrollmentSMSTest.java | 2 +- .../tracker/imports/TrackerEventSMSTest.java | 2 +- .../imports/TrackerImportControllerTest.java | 2 +- .../imports/TrackerImportReportTest.java | 2 +- .../TrackerOwnershipControllerTest.java | 4 +- .../UserDatastoreControllerTest.java | 4 +- .../UserDatastoreFieldsControllerTest.java | 2 +- .../UserDatastoreFilterControllerTest.java | 2 +- .../UserDatastoreSuperuserControllerTest.java | 4 +- .../security/ApiTokenAuthenticationTest.java | 6 +- .../security/ApiTokenControllerTest.java | 10 +- .../webapi/security/JwtBearerTokenTest.java | 4 +- 221 files changed, 629 insertions(+), 565 deletions(-) rename dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/{test/web/WebClientUtils.java => http/HttpAssertions.java} (55%) rename dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/{test/web/WebClient.java => http/HttpClientAdapter.java} (90%) create mode 100644 dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpClientUtils.java rename dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/{test/web => http}/HttpMethod.java (98%) rename dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/{test/web => http}/HttpStatus.java (99%) diff --git a/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/test/web/WebClientUtils.java b/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpAssertions.java similarity index 55% rename from dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/test/web/WebClientUtils.java rename to dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpAssertions.java index a05588090a6d..28740bc19721 100644 --- a/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/test/web/WebClientUtils.java +++ b/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpAssertions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2022, University of Oslo + * Copyright (c) 2004-2024, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,36 +25,29 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package org.hisp.dhis.test.web; +package org.hisp.dhis.http; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; -import java.io.IOException; -import java.net.URISyntaxException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.Objects; import java.util.concurrent.Callable; -import java.util.stream.Stream; +import javax.annotation.CheckForNull; +import javax.annotation.Nonnull; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus.Series; -import org.hisp.dhis.test.web.WebClient.HttpResponse; -import org.hisp.dhis.test.web.WebClient.RequestComponent; import org.hisp.dhis.test.webapi.json.domain.JsonError; /** - * Helpers needed when testing with {@link WebClient} and {@code - * org.springframework.test.web.servlet.MockMvc}. + * Assertions for {@link HttpClientAdapter} API based tests. * * @author Jan Bernitt + * @since 2.42 (extracted from existing utils) */ -public class WebClientUtils { - +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public class HttpAssertions { /** - * Asserts that the {@link HttpResponse} has the expected {@link HttpStatus}. + * Asserts that the {@link HttpClientAdapter.HttpResponse} has the expected {@link HttpStatus}. * *

If status is {@link HttpStatus#CREATED} the method returns the UID of the created object in * case it is provided by the response. This is based on a convention used in DHIS2. @@ -63,7 +56,7 @@ public class WebClientUtils { * @param actual the response we actually got * @return UID of the created object (if available) or {@code null} */ - public static String assertStatus(HttpStatus expected, HttpResponse actual) { + public static String assertStatus(HttpStatus expected, HttpClientAdapter.HttpResponse actual) { HttpStatus actualStatus = actual.status(); if (expected != actualStatus) { // OBS! we use the actual state to not fail the check in error @@ -80,19 +73,22 @@ public static String assertStatus(HttpStatus expected, HttpResponse actual) { } /** - * Asserts that the {@link HttpResponse} has the expected {@link Series}. This is useful on cases - * where it only matters that operation was {@link Series#SUCCESSFUL} or say {@link - * Series#CLIENT_ERROR} but not which exact code of the series. + * Asserts that the {@link HttpClientAdapter.HttpResponse} has the expected {@link + * HttpStatus.Series}. This is useful on cases where it only matters that operation was {@link + * HttpStatus.Series#SUCCESSFUL} or say {@link HttpStatus.Series#CLIENT_ERROR} but not which exact + * code of the series. * *

If status is {@link HttpStatus#CREATED} the method returns the UID of the created object in * case it is provided by the response. This is based on a convention used in DHIS2. * - * @param expected status {@link Series} we should get + * @param expected status {@link HttpStatus.Series} we should get * @param actual the response we actually got * @return UID of the created object (if available) or {@code null} */ - public static String assertSeries(Series expected, HttpResponse actual) { - Series actualSeries = actual.series(); + @CheckForNull + public static String assertSeries( + @Nonnull HttpStatus.Series expected, @Nonnull HttpClientAdapter.HttpResponse actual) { + HttpStatus.Series actualSeries = actual.series(); if (expected != actualSeries) { // OBS! we use the actual state to not fail the check in error String msg = actual.error(actualSeries).summary(); @@ -102,7 +98,7 @@ public static String assertSeries(Series expected, HttpResponse actual) { return getCreatedId(actual); } - public static void assertValidLocation(HttpResponse actual) { + public static void assertValidLocation(@Nonnull HttpClientAdapter.HttpResponse actual) { String location = actual.location(); if (location == null) { return; @@ -115,7 +111,8 @@ public static void assertValidLocation(HttpResponse actual) { "Location header does contain multiple protocol parts"); } - private static String getCreatedId(HttpResponse response) { + @CheckForNull + private static String getCreatedId(HttpClientAdapter.HttpResponse response) { HttpStatus actual = response.status(); if (actual == HttpStatus.CREATED) { JsonObject report = response.contentUnchecked().getObject("response"); @@ -127,76 +124,11 @@ private static String getCreatedId(HttpResponse response) { return location == null ? null : location.substring(location.lastIndexOf('/') + 1); } - public static String substitutePlaceholders(String url, Object[] args) { - if (args.length == 0) return url; - - Object[] urlArgs = - Stream.of(args) - .filter(arg -> !(arg instanceof RequestComponent) && !(arg instanceof Path)) - .map(arg -> arg == null ? "" : arg) - .toArray(); - return String.format(url.replaceAll("\\{[a-zA-Z]+}", "%s"), urlArgs); - } - - public static String objectReferences(String... uids) { - StringBuilder str = new StringBuilder(); - str.append('['); - for (String uid : uids) { - if (str.length() > 1) { - str.append(','); - } - str.append(objectReference(uid)); - } - str.append(']'); - return str.toString(); - } - - public static String objectReference(String uid) { - return String.format("{\"id\":\"%s\"}", uid); - } - - public static T callAndFailOnException(Callable op) { + public static T exceptionAsFail(Callable op) { try { return op.call(); } catch (Exception ex) { throw new AssertionError(ex); } } - - public static RequestComponent[] requestComponentsIn(Object... args) { - return Stream.of(args) - .map( - arg -> - arg instanceof Path path ? new WebClient.Body(fileContent(path.toString())) : arg) - .filter(RequestComponent.class::isInstance) - .toArray(RequestComponent[]::new); - } - - @SuppressWarnings("unchecked") - public static T getComponent( - Class type, RequestComponent[] components) { - return (T) - Stream.of(components) - .filter(Objects::nonNull) - .filter(c -> c.getClass() == type) - .findFirst() - .orElse(null); - } - - public static String fileContent(String filename) { - try { - return Files.readString( - Path.of( - Objects.requireNonNull(WebClientUtils.class.getClassLoader().getResource(filename)) - .toURI()), - StandardCharsets.UTF_8); - } catch (IOException | URISyntaxException e) { - fail(e); - return null; - } - } - - private WebClientUtils() { - throw new UnsupportedOperationException("util"); - } } diff --git a/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/test/web/WebClient.java b/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpClientAdapter.java similarity index 90% rename from dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/test/web/WebClient.java rename to dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpClientAdapter.java index 3c7634511d3d..cedd2c766ff9 100644 --- a/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/test/web/WebClient.java +++ b/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpClientAdapter.java @@ -25,15 +25,15 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package org.hisp.dhis.test.web; +package org.hisp.dhis.http; import static org.apache.commons.lang3.ArrayUtils.insert; -import static org.hisp.dhis.test.web.WebClientUtils.assertSeries; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; -import static org.hisp.dhis.test.web.WebClientUtils.callAndFailOnException; -import static org.hisp.dhis.test.web.WebClientUtils.fileContent; -import static org.hisp.dhis.test.web.WebClientUtils.requestComponentsIn; -import static org.hisp.dhis.test.web.WebClientUtils.substitutePlaceholders; +import static org.hisp.dhis.http.HttpAssertions.assertSeries; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.exceptionAsFail; +import static org.hisp.dhis.http.HttpClientUtils.fileContent; +import static org.hisp.dhis.http.HttpClientUtils.requestComponentsIn; +import static org.hisp.dhis.http.HttpClientUtils.substitutePlaceholders; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -58,7 +58,7 @@ */ @FunctionalInterface @SuppressWarnings("java:S100") -public interface WebClient { +public interface HttpClientAdapter { /** * Execute the request with the provided parameters. @@ -130,23 +130,27 @@ record Header(String name, Object value) implements RequestComponent {} record Body(String content) implements RequestComponent {} + @Nonnull default HttpResponse GET(String url, Object... args) { return perform(HttpMethod.GET, substitutePlaceholders(url, args), requestComponentsIn(args)); } + @Nonnull default HttpResponse POST(String url, Object... args) { return perform(HttpMethod.POST, substitutePlaceholders(url, args), requestComponentsIn(args)); } + @Nonnull default HttpResponse POST(String url, @Language("json5") String body) { return perform(HttpMethod.POST, url, new Body(body)); } + @Nonnull default HttpResponse POST(String url, Path body) { - return callAndFailOnException( - () -> POST(url, Body(fileContent(body.toString())), ContentType(body))); + return exceptionAsFail(() -> POST(url, Body(fileContent(body.toString())), ContentType(body))); } + @Nonnull default HttpResponse PATCH(String url, Object... args) { // Default mime-type is added as first element so that content type in // arguments does not override it @@ -156,8 +160,9 @@ default HttpResponse PATCH(String url, Object... args) { insert(0, requestComponentsIn(args), ContentType("application/json-patch+json"))); } + @Nonnull default HttpResponse PATCH(String url, Path body) { - return callAndFailOnException( + return exceptionAsFail( () -> PATCH( url, @@ -165,31 +170,37 @@ default HttpResponse PATCH(String url, Path body) { ContentType("application/json-patch+json"))); } + @Nonnull default HttpResponse PATCH(String url, @Language("json5") String body) { return perform(HttpMethod.PATCH, url, ContentType("application/json-patch+json"), Body(body)); } + @Nonnull default HttpResponse PUT(String url, Object... args) { return perform(HttpMethod.PUT, substitutePlaceholders(url, args), requestComponentsIn(args)); } + @Nonnull default HttpResponse PUT(String url, Path body) { - return callAndFailOnException( - () -> PUT(url, Body(fileContent(body.toString())), ContentType(body))); + return exceptionAsFail(() -> PUT(url, Body(fileContent(body.toString())), ContentType(body))); } + @Nonnull default HttpResponse PUT(String url, @Language("json5") String body) { return perform(HttpMethod.PUT, url, new Body(body)); } + @Nonnull default HttpResponse DELETE(String url, Object... args) { return perform(HttpMethod.DELETE, substitutePlaceholders(url, args), requestComponentsIn(args)); } + @Nonnull default HttpResponse DELETE(String url, @Language("json5") String body) { return perform(HttpMethod.DELETE, url, new Body(body)); } + @Nonnull default HttpResponse perform(HttpMethod method, String url, RequestComponent... components) { // configure headers String contentMediaType = null; @@ -205,7 +216,7 @@ default HttpResponse perform(HttpMethod method, String url, RequestComponent... } } // configure body - Body bodyComponent = WebClientUtils.getComponent(Body.class, components); + Body bodyComponent = HttpClientUtils.getComponent(Body.class, components); String body = bodyComponent == null ? "" : bodyComponent.content(); String mediaType = contentMediaType != null ? contentMediaType : "application/json"; if (body == null || body.isEmpty()) return perform(method, url, headers, null, null); @@ -213,7 +224,7 @@ default HttpResponse perform(HttpMethod method, String url, RequestComponent... return perform(method, url, headers, mediaType, body); } - /** Implemented to adapt the {@link WebClient} API to an actual implementation response */ + /** Implemented to adapt the {@link HttpClientAdapter} API to an actual implementation response */ interface HttpResponseAdapter { /** @@ -272,7 +283,7 @@ public String content(String contentType) { String actualContentType = header("Content-Type"); assertNotNull(actualContentType, "response content-type was not set"); if (!actualContentType.startsWith(contentType)) assertEquals(contentType, actualContentType); - return callAndFailOnException(response::getContent); + return exceptionAsFail(response::getContent); } public JsonMixed content() { @@ -325,7 +336,7 @@ public boolean hasBody() { } public JsonMixed contentUnchecked() { - return callAndFailOnException(() -> JsonMixed.of(response.getContent())); + return exceptionAsFail(() -> JsonMixed.of(response.getContent())); } public String location() { diff --git a/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpClientUtils.java b/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpClientUtils.java new file mode 100644 index 000000000000..45c3de2e8879 --- /dev/null +++ b/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpClientUtils.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2004-2022, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.hisp.dhis.http; + +import static org.junit.jupiter.api.Assertions.fail; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Objects; +import java.util.stream.Stream; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; +import org.hisp.dhis.http.HttpClientAdapter.RequestComponent; + +/** + * Helpers needed when testing with {@link HttpClientAdapter} and {@code + * org.springframework.test.web.servlet.MockMvc}. + * + * @author Jan Bernitt + */ +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public class HttpClientUtils { + + static String substitutePlaceholders(String url, Object... args) { + if (args.length == 0) return url; + + Object[] urlArgs = + Stream.of(args) + .filter(arg -> !(arg instanceof RequestComponent) && !(arg instanceof Path)) + .map(arg -> arg == null ? "" : arg) + .toArray(); + return String.format(url.replaceAll("\\{[a-zA-Z]+}", "%s"), urlArgs); + } + + static RequestComponent[] requestComponentsIn(Object... args) { + return Stream.of(args) + .map( + arg -> + arg instanceof Path path + ? new HttpClientAdapter.Body(fileContent(path.toString())) + : arg) + .filter(RequestComponent.class::isInstance) + .toArray(RequestComponent[]::new); + } + + @SuppressWarnings("unchecked") + static T getComponent(Class type, RequestComponent[] components) { + return (T) + Stream.of(components) + .filter(Objects::nonNull) + .filter(c -> c.getClass() == type) + .findFirst() + .orElse(null); + } + + static String fileContent(String filename) { + try { + return Files.readString( + Path.of( + Objects.requireNonNull(HttpClientUtils.class.getClassLoader().getResource(filename)) + .toURI()), + StandardCharsets.UTF_8); + } catch (IOException | URISyntaxException e) { + fail(e); + return null; + } + } +} diff --git a/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/test/web/HttpMethod.java b/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpMethod.java similarity index 98% rename from dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/test/web/HttpMethod.java rename to dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpMethod.java index ac08343245e3..1e6f30f22ee8 100644 --- a/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/test/web/HttpMethod.java +++ b/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpMethod.java @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package org.hisp.dhis.test.web; +package org.hisp.dhis.http; /** * Valid HTTP methods. diff --git a/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/test/web/HttpStatus.java b/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpStatus.java similarity index 99% rename from dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/test/web/HttpStatus.java rename to dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpStatus.java index 606f55d5b0af..a651706ea16c 100644 --- a/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/test/web/HttpStatus.java +++ b/dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/http/HttpStatus.java @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package org.hisp.dhis.test.web; +package org.hisp.dhis.http; import static java.util.Arrays.stream; import static java.util.stream.Collectors.toUnmodifiableMap; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/test/webapi/Assertions.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/test/webapi/Assertions.java index 2a94cc378c91..e82c5bbb3535 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/test/webapi/Assertions.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/test/webapi/Assertions.java @@ -31,10 +31,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.hisp.dhis.http.HttpClientAdapter.HttpResponse; +import org.hisp.dhis.http.HttpStatus; +import org.hisp.dhis.http.HttpStatus.Series; import org.hisp.dhis.jsontree.JsonMixed; -import org.hisp.dhis.test.web.HttpStatus; -import org.hisp.dhis.test.web.HttpStatus.Series; -import org.hisp.dhis.test.web.WebClient.HttpResponse; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/test/webapi/ControllerIntegrationTestBase.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/test/webapi/ControllerIntegrationTestBase.java index 1d01592cd809..3a67ac6083f5 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/test/webapi/ControllerIntegrationTestBase.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/test/webapi/ControllerIntegrationTestBase.java @@ -28,8 +28,8 @@ package org.hisp.dhis.test.webapi; import static java.lang.String.format; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; -import static org.hisp.dhis.test.web.WebClientUtils.callAndFailOnException; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.exceptionAsFail; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart; import java.io.UnsupportedEncodingException; @@ -40,11 +40,11 @@ import org.hisp.dhis.common.IdentifiableObjectManager; import org.hisp.dhis.common.ValueType; import org.hisp.dhis.dbms.DbmsManager; +import org.hisp.dhis.http.HttpClientAdapter; +import org.hisp.dhis.http.HttpMethod; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.render.RenderService; import org.hisp.dhis.test.IntegrationTestBase; -import org.hisp.dhis.test.web.HttpMethod; -import org.hisp.dhis.test.web.HttpStatus; -import org.hisp.dhis.test.web.WebClient; import org.hisp.dhis.user.User; import org.junit.jupiter.api.BeforeEach; import org.springframework.beans.factory.annotation.Autowired; @@ -87,7 +87,7 @@ @WebAppConfiguration @ContextConfiguration(classes = {MvcTestConfig.class, WebTestConfig.class}) public abstract class ControllerIntegrationTestBase extends IntegrationTestBase - implements WebClient { + implements HttpClientAdapter { @Autowired protected WebApplicationContext webApplicationContext; @@ -182,7 +182,7 @@ protected final HttpResponse POST_MULTIPART(String url, MockMultipartFile part) } protected HttpResponse perform(MockHttpServletRequestBuilder request) { - return callAndFailOnException( + return exceptionAsFail( () -> new HttpResponse( toResponse(mvc.perform(request.session(session)).andReturn().getResponse()))); @@ -249,7 +249,7 @@ public String getHeader(String name) { } protected final MvcResult webRequestWithMvcResult(MockHttpServletRequestBuilder request) { - return callAndFailOnException(() -> mvc.perform(request.session(session)).andReturn()); + return exceptionAsFail(() -> mvc.perform(request.session(session)).andReturn()); } protected final String addDataElement( diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/test/webapi/ControllerWithApiTokenAuthTestBase.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/test/webapi/ControllerWithApiTokenAuthTestBase.java index f480cd581636..f74d60cae0f2 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/test/webapi/ControllerWithApiTokenAuthTestBase.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/test/webapi/ControllerWithApiTokenAuthTestBase.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.test.webapi; -import static org.hisp.dhis.test.web.WebClientUtils.callAndFailOnException; +import static org.hisp.dhis.http.HttpAssertions.exceptionAsFail; import org.hisp.dhis.test.config.H2TestConfig; import org.hisp.dhis.webapi.security.config.WebMvcConfig; @@ -66,7 +66,7 @@ void setupMockMvc() { @Override protected final HttpResponse perform(MockHttpServletRequestBuilder request) { - return callAndFailOnException( + return exceptionAsFail( () -> new HttpResponse(toResponse(mvc.perform(request).andReturn().getResponse()))); } } diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractCrudControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractCrudControllerTest.java index 3b67cf7b7bba..97a596c5e3ed 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractCrudControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractCrudControllerTest.java @@ -29,12 +29,12 @@ import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; +import static org.hisp.dhis.http.HttpAssertions.assertSeries; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; +import static org.hisp.dhis.http.HttpStatus.Series.SUCCESSFUL; import static org.hisp.dhis.test.utils.Assertions.assertStartsWith; -import static org.hisp.dhis.test.web.HttpStatus.Series.SUCCESSFUL; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; -import static org.hisp.dhis.test.web.WebClientUtils.assertSeries; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -50,12 +50,12 @@ import org.hisp.dhis.dataelement.DataElementGroup; import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonMixed; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.period.PeriodType; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonAttributeValue; import org.hisp.dhis.test.webapi.json.domain.JsonError; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractDataValueControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractDataValueControllerTest.java index f5280f00bc47..8b94420ee8f8 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractDataValueControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractDataValueControllerTest.java @@ -27,15 +27,17 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; -import static org.hisp.dhis.test.web.WebClientUtils.substitutePlaceholders; +import static org.apache.commons.lang3.StringUtils.isEmpty; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import java.util.ArrayList; +import java.util.List; import org.hisp.dhis.common.ValueType; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.user.User; import org.junit.jupiter.api.BeforeEach; @@ -130,10 +132,15 @@ protected final JsonArray getDataValues(String de, String pe, String ou) { protected final JsonArray getDataValues( String de, String co, String cc, String cp, String pe, String ou) { - String url = - substitutePlaceholders( - "/dataValues?de={de}&co={co}&cc={cc}&cp={cp}&pe={pe}&ou={ou}", - new Object[] {de, co, cc, cp, pe, ou}); - return GET(url.replaceAll("&[a-z]{2}=&", "&").replace("&&", "&")).content(); + List params = new ArrayList<>(); + String url = "/dataValues"; + if (!isEmpty(de)) params.add("de=" + de); + if (!isEmpty(co)) params.add("co=" + co); + if (!isEmpty(cc)) params.add("cc=" + cc); + if (!isEmpty(cp)) params.add("cp=" + cp); + if (!isEmpty(pe)) params.add("pe=" + pe); + if (!isEmpty(ou)) params.add("ou=" + ou); + if (!params.isEmpty()) url += "?" + String.join("&", params); + return GET(url).content(); } } diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractDatastoreControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractDatastoreControllerTest.java index 5f785da10b4f..6d5991987865 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractDatastoreControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractDatastoreControllerTest.java @@ -27,13 +27,13 @@ */ package org.hisp.dhis.webapi.controller; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.utils.JavaToJson.toJson; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import java.util.List; import java.util.Map; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.utils.JavaToJson; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractGistControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractGistControllerTest.java index df17ccbdc2b4..603db76dfb04 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractGistControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractGistControllerTest.java @@ -27,17 +27,17 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Body; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.organisationunit.OrganisationUnitService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.user.User; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractUserDatastoreControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractUserDatastoreControllerTest.java index a34f9178b173..87fb6326e302 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractUserDatastoreControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AbstractUserDatastoreControllerTest.java @@ -27,13 +27,13 @@ */ package org.hisp.dhis.webapi.controller; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.utils.JavaToJson.toJson; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import java.util.List; import java.util.Map; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.utils.JavaToJson; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AccountControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AccountControllerTest.java index 873315626143..58b1944fe370 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AccountControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AccountControllerTest.java @@ -27,8 +27,8 @@ */ package org.hisp.dhis.webapi.controller; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.utils.Assertions.assertContainsOnly; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -37,13 +37,13 @@ import java.util.List; import java.util.Set; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonMixed; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.message.MessageSender; import org.hisp.dhis.outboundmessage.OutboundMessage; import org.hisp.dhis.setting.SystemSettingsService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.user.User; import org.junit.jupiter.api.AfterEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AnalyticsOutlierDetectionControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AnalyticsOutlierDetectionControllerTest.java index 123e0ec2d5f1..e7f0fad12783 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AnalyticsOutlierDetectionControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AnalyticsOutlierDetectionControllerTest.java @@ -29,8 +29,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonMixed; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AnalyticsTableHookControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AnalyticsTableHookControllerTest.java index c03d948d24a0..cdcf32c46630 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AnalyticsTableHookControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AnalyticsTableHookControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import org.hisp.dhis.feedback.ErrorCode; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonErrorReport; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AppControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AppControllerTest.java index 3b9d97c65a90..9f358010c95a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AppControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AppControllerTest.java @@ -38,11 +38,11 @@ import java.nio.file.Path; import org.hisp.dhis.appmanager.AppManager; import org.hisp.dhis.external.conf.DhisConfigurationProvider; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonMixed; import org.hisp.dhis.security.Authorities; import org.hisp.dhis.test.config.TestDhisConfigurationProvider; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.webapi.controller.AppControllerTest.DhisConfig; import org.junit.jupiter.api.DisplayName; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AppHubControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AppHubControllerTest.java index 46590f696a0f..6ff340434753 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AppHubControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AppHubControllerTest.java @@ -33,9 +33,9 @@ import org.hisp.dhis.external.conf.ConfigurationKey; import org.hisp.dhis.external.conf.DhisConfigurationProvider; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AttributeControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AttributeControllerTest.java index 8572fc2b9e6b..3bd22eabed87 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AttributeControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/AttributeControllerTest.java @@ -27,13 +27,13 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import org.hisp.dhis.attribute.Attribute.ObjectType; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/BulkPatchSharingControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/BulkPatchSharingControllerTest.java index bcc951aea067..053f506f12b7 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/BulkPatchSharingControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/BulkPatchSharingControllerTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -37,8 +37,8 @@ import java.nio.file.Path; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataset.DataSet; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.security.acl.AccessStringHelper; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; import org.hisp.dhis.user.sharing.Sharing; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryComboControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryComboControllerTest.java index 1eb501eb9d2d..55d6cd30846d 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryComboControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryComboControllerTest.java @@ -36,8 +36,8 @@ import org.hisp.dhis.category.CategoryOption; import org.hisp.dhis.category.CategoryOptionCombo; import org.hisp.dhis.category.CategoryService; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonCategoryCombo; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryComboModificationControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryComboModificationControllerTest.java index 1274c04baf2c..97a143e8c10d 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryComboModificationControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryComboModificationControllerTest.java @@ -27,13 +27,13 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Body; import org.hisp.dhis.common.ValueType; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonCategoryOptionCombo; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryControllerTest.java index cd16d5736a4c..6806f4396ad2 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryControllerTest.java @@ -35,8 +35,8 @@ import org.hisp.dhis.category.Category; import org.hisp.dhis.category.CategoryOption; import org.hisp.dhis.category.CategoryService; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonCategory; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryOptionComboControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryOptionComboControllerTest.java index 0289e9d964f8..ab13aa6564e4 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryOptionComboControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryOptionComboControllerTest.java @@ -36,8 +36,8 @@ import org.hisp.dhis.category.CategoryOption; import org.hisp.dhis.category.CategoryOptionCombo; import org.hisp.dhis.category.CategoryService; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonCategoryOptionCombo; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryOptionControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryOptionControllerTest.java index 4b3c8c32393a..0af44f4fc90d 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryOptionControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CategoryOptionControllerTest.java @@ -34,8 +34,8 @@ import java.util.stream.Collectors; import org.hisp.dhis.category.CategoryOption; import org.hisp.dhis.category.CategoryService; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonCategoryOption; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ChangeLogControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ChangeLogControllerTest.java index 85cc9ce7a99c..e72144268617 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ChangeLogControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ChangeLogControllerTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.Set; @@ -35,13 +35,13 @@ import org.hisp.dhis.category.CategoryService; import org.hisp.dhis.common.CodeGenerator; import org.hisp.dhis.common.IdentifiableObjectManager; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Enrollment; import org.hisp.dhis.program.Event; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramStage; import org.hisp.dhis.security.acl.AccessStringHelper; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.trackedentity.TrackedEntity; import org.hisp.dhis.trackedentity.TrackedEntityType; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationControllerTest.java index f13d92447d3c..1f9b265459c3 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CompleteDataSetRegistrationControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Accept; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Accept; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.hisp.dhis.webapi.utils.ContextUtils.CONTENT_TYPE_XML; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -38,7 +38,7 @@ import static org.springframework.http.MediaType.APPLICATION_JSON; import static org.springframework.http.MediaType.APPLICATION_XML; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonImportSummary; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CrudControllerIntegrationTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CrudControllerIntegrationTest.java index 6036029e52c5..2656f9fae1d5 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CrudControllerIntegrationTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CrudControllerIntegrationTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -35,10 +35,10 @@ import java.util.Locale; import lombok.extern.slf4j.Slf4j; import org.hisp.dhis.dataset.DataSet; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.setting.SystemSettingsService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.user.User; import org.hisp.dhis.user.UserSettingsService; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CrudControllerPagingTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CrudControllerPagingTest.java index 7edac1d0435f..07abc6f6b0c9 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CrudControllerPagingTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/CrudControllerPagingTest.java @@ -29,9 +29,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.organisationunit.OrganisationUnitService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonOrganisationUnit; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DashboardControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DashboardControllerTest.java index 8d8004bbac60..75e98af72202 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DashboardControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DashboardControllerTest.java @@ -37,9 +37,9 @@ import org.hisp.dhis.dashboard.Dashboard; import org.hisp.dhis.dashboard.DashboardItem; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonMixed; import org.hisp.dhis.security.acl.AclService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonErrorReport; import org.hisp.dhis.user.User; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataApprovalControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataApprovalControllerTest.java index 425e4604c2f8..57ff6def478d 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataApprovalControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataApprovalControllerTest.java @@ -27,17 +27,17 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import org.hisp.dhis.category.CategoryService; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.period.PeriodService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonDataApprovalPermissions; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataElementControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataElementControllerTest.java index 67a6a210c5d5..831b827cba55 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataElementControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataElementControllerTest.java @@ -37,9 +37,9 @@ import org.hisp.dhis.category.CategoryService; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementService; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonValue; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonDataElement; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataSetControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataSetControllerTest.java index 0f6e49028f0a..8cbf38d30207 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataSetControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataSetControllerTest.java @@ -27,16 +27,16 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import java.nio.file.Path; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataset.DataSet; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataSetMetadataControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataSetMetadataControllerTest.java index 6df9e6e352bd..b4b8559fc72e 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataSetMetadataControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataSetMetadataControllerTest.java @@ -31,9 +31,9 @@ import java.nio.file.Path; import java.util.stream.Stream; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueControllerTest.java index 0be3ff595213..19208e27e244 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueControllerTest.java @@ -28,8 +28,8 @@ package org.hisp.dhis.webapi.controller; import static java.lang.String.format; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Body; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -38,9 +38,9 @@ import org.hisp.dhis.datavalue.DataValue; import org.hisp.dhis.datavalue.DataValueService; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpMethod; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.test.web.HttpMethod; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.user.User; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueFileResourceControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueFileResourceControllerTest.java index 80be7fd1ceea..2058268844e6 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueFileResourceControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueFileResourceControllerTest.java @@ -28,16 +28,16 @@ package org.hisp.dhis.webapi.controller; import static java.lang.String.format; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Body; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import org.hisp.dhis.common.CodeGenerator; import org.hisp.dhis.common.ValueType; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueMultiTextControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueMultiTextControllerTest.java index c5361d1409b5..132fec086e93 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueMultiTextControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueMultiTextControllerTest.java @@ -28,7 +28,7 @@ package org.hisp.dhis.webapi.controller; import static java.lang.String.format; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -37,8 +37,8 @@ import java.util.stream.Stream; import org.hisp.dhis.common.ValueType; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonImportConflict; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueSetControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueSetControllerTest.java index e41d556c9a93..ccd6b4e98c21 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueSetControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DataValueSetControllerTest.java @@ -27,11 +27,11 @@ */ package org.hisp.dhis.webapi.controller; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Accept; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; import static org.hisp.dhis.test.utils.Assertions.assertStartsWith; -import static org.hisp.dhis.test.web.WebClient.Accept; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.hisp.dhis.webapi.utils.ContextUtils.CONTENT_TYPE_XML; import static org.hisp.dhis.webapi.utils.ContextUtils.CONTENT_TYPE_XML_ADX; @@ -41,8 +41,8 @@ import java.util.List; import java.util.Set; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonImportSummary; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerAndroidSettingsAppTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerAndroidSettingsAppTest.java index b52668f6adf0..ace7d8959444 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerAndroidSettingsAppTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerAndroidSettingsAppTest.java @@ -30,11 +30,11 @@ import static java.util.Collections.singletonList; import static org.hisp.dhis.appmanager.AndroidSettingsApp.AUTHORITY; import static org.hisp.dhis.appmanager.AndroidSettingsApp.NAMESPACE; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import org.hisp.dhis.datastore.DatastoreService; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerAppAdditionalNamespacesTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerAppAdditionalNamespacesTest.java index 45fe035ff125..5ccf29f5bddc 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerAppAdditionalNamespacesTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerAppAdditionalNamespacesTest.java @@ -27,14 +27,14 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.IOException; import org.hisp.dhis.appmanager.AppManager; import org.hisp.dhis.appmanager.AppStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerAppTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerAppTest.java index 3eb4ec9d3b66..991bd9d551ce 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerAppTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerAppTest.java @@ -28,15 +28,15 @@ package org.hisp.dhis.webapi.controller; import static java.util.Collections.singletonList; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.IOException; import org.hisp.dhis.appmanager.App; import org.hisp.dhis.appmanager.AppManager; import org.hisp.dhis.appmanager.AppStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.security.Authorities; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerIntegrationTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerIntegrationTest.java index c8f809f54323..5e2e32ba6166 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerIntegrationTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerIntegrationTest.java @@ -30,7 +30,7 @@ import static java.util.Arrays.asList; import static org.hisp.dhis.appmanager.AndroidSettingsApp.AUTHORITY; import static org.hisp.dhis.appmanager.AndroidSettingsApp.NAMESPACE; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.IOException; @@ -41,8 +41,8 @@ import org.hisp.dhis.datastore.DatastoreNamespaceProtection; import org.hisp.dhis.datastore.DatastoreService; import org.hisp.dhis.feedback.ForbiddenException; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.security.Authorities; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonDatastoreValue; import org.hisp.dhis.user.CurrentUserUtil; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerTest.java index 7f3c73b30aa4..3f0f3ca5f049 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreControllerTest.java @@ -31,9 +31,9 @@ import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; import static org.hisp.dhis.datastore.MetadataDatastoreService.METADATA_STORE_NS; +import static org.hisp.dhis.http.HttpAssertions.assertSeries; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.utils.Assertions.assertContainsOnly; -import static org.hisp.dhis.test.web.WebClientUtils.assertSeries; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -47,10 +47,10 @@ import org.hisp.dhis.datastore.DatastoreNamespaceProtection.ProtectionType; import org.hisp.dhis.datastore.DatastoreService; import org.hisp.dhis.feedback.ForbiddenException; +import org.hisp.dhis.http.HttpStatus; +import org.hisp.dhis.http.HttpStatus.Series; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; -import org.hisp.dhis.test.web.HttpStatus.Series; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonDatastoreValue; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreFieldsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreFieldsControllerTest.java index 72d3daaaa07e..afdae0626628 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreFieldsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreFieldsControllerTest.java @@ -36,8 +36,8 @@ import jakarta.servlet.http.HttpServletResponse; import java.util.List; import org.hisp.dhis.datastore.DatastoreParams; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreFilterControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreFilterControllerTest.java index 483bd86d358e..1094b1e9cbdb 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreFilterControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreFilterControllerTest.java @@ -34,7 +34,7 @@ import jakarta.servlet.http.HttpServletResponse; import java.util.List; import org.hisp.dhis.datastore.DatastoreParams; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreUpdateControllerIntegrationTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreUpdateControllerIntegrationTest.java index e76cb0dd97a4..50e5f6d4df80 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreUpdateControllerIntegrationTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DatastoreUpdateControllerIntegrationTest.java @@ -27,14 +27,14 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.HttpStatus.NOT_FOUND; -import static org.hisp.dhis.test.web.HttpStatus.OK; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpStatus.NOT_FOUND; +import static org.hisp.dhis.http.HttpStatus.OK; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.user.CurrentUserUtil; import org.hisp.dhis.user.UserDetails; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DimensionControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DimensionControllerTest.java index bd8a33c8b2d0..1ad9b65f4b18 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DimensionControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/DimensionControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.utils.CsvUtils.getRowCountFromCsv; import static org.hisp.dhis.test.utils.CsvUtils.getRowFromCsv; import static org.hisp.dhis.test.utils.CsvUtils.getValueFromCsv; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import static org.hisp.dhis.webapi.controller.AbstractGistControllerTest.assertHasNoPager; import static org.hisp.dhis.webapi.controller.AbstractGistControllerTest.assertHasPager; import static org.hisp.dhis.webapi.controller.AbstractGistControllerTest.assertHasPagerLinks; @@ -46,11 +46,11 @@ import org.hisp.dhis.category.CategoryService; import org.hisp.dhis.common.DataDimensionType; import org.hisp.dhis.common.UID; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.organisationunit.OrganisationUnitGroupService; import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EmailControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EmailControllerTest.java index c967b60bbbdf..1a08c95c2ff8 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EmailControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EmailControllerTest.java @@ -29,7 +29,7 @@ import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EnrollmentQueryAnalyticsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EnrollmentQueryAnalyticsControllerTest.java index 486246950174..df0f7ef18c2e 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EnrollmentQueryAnalyticsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EnrollmentQueryAnalyticsControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonString; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonGrid; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventChartControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventChartControllerTest.java index 7cdf3bcfc7ad..8d4ebe135066 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventChartControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventChartControllerTest.java @@ -29,8 +29,8 @@ import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hisp.dhis.test.web.HttpStatus.CREATED; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpStatus.CREATED; import static org.junit.jupiter.api.Assertions.assertTrue; import org.hisp.dhis.common.IdentifiableObjectManager; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventHookControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventHookControllerTest.java index 24dda7cfd05e..7b5ef67c6649 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventHookControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventHookControllerTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -36,9 +36,9 @@ import org.hisp.dhis.common.auth.ApiTokenAuth; import org.hisp.dhis.common.auth.HttpBasicAuth; import org.hisp.dhis.eventhook.targets.WebhookTarget; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventQueryAnalyticsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventQueryAnalyticsControllerTest.java index 357b1f69da0e..57fba58895d9 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventQueryAnalyticsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventQueryAnalyticsControllerTest.java @@ -27,11 +27,11 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonString; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonGrid; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventReportControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventReportControllerTest.java index 97b2633f83cd..27c869f9a0ed 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventReportControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventReportControllerTest.java @@ -30,10 +30,10 @@ import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hisp.dhis.test.web.HttpStatus.BAD_REQUEST; -import static org.hisp.dhis.test.web.HttpStatus.CREATED; -import static org.hisp.dhis.test.web.HttpStatus.OK; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpStatus.BAD_REQUEST; +import static org.hisp.dhis.http.HttpStatus.CREATED; +import static org.hisp.dhis.http.HttpStatus.OK; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventVisualizationControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventVisualizationControllerTest.java index 4328b88aeb23..58b5feff801d 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventVisualizationControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/EventVisualizationControllerTest.java @@ -35,11 +35,11 @@ import static org.hisp.dhis.dataelement.DataElementDomain.TRACKER; import static org.hisp.dhis.eventvisualization.Attribute.COLUMN; import static org.hisp.dhis.eventvisualization.EventVisualizationType.LINE; -import static org.hisp.dhis.test.web.HttpStatus.BAD_REQUEST; -import static org.hisp.dhis.test.web.HttpStatus.CONFLICT; -import static org.hisp.dhis.test.web.HttpStatus.CREATED; -import static org.hisp.dhis.test.web.HttpStatus.OK; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpStatus.BAD_REQUEST; +import static org.hisp.dhis.http.HttpStatus.CONFLICT; +import static org.hisp.dhis.http.HttpStatus.CREATED; +import static org.hisp.dhis.http.HttpStatus.OK; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/FileControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/FileControllerTest.java index dfbcd8a2528d..fd88ddb40848 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/FileControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/FileControllerTest.java @@ -27,11 +27,11 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/FileResourceControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/FileResourceControllerTest.java index f073be350fac..8619ad316873 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/FileResourceControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/FileResourceControllerTest.java @@ -34,9 +34,9 @@ import java.io.IOException; import java.nio.file.Files; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.jsontree.JsonString; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/FollowupAnalysisControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/FollowupAnalysisControllerTest.java index 96b1a5c4ed16..7e9e3b4ddd3e 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/FollowupAnalysisControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/FollowupAnalysisControllerTest.java @@ -29,7 +29,7 @@ import static java.util.Arrays.asList; import static java.util.stream.Collectors.toSet; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -39,9 +39,9 @@ import java.util.Arrays; import org.hisp.dhis.dataanalysis.FollowupAnalysisRequest; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonError; import org.hisp.dhis.test.webapi.json.domain.JsonFollowupValue; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GeoFeatureControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GeoFeatureControllerTest.java index 0dca1992040f..7feff6484586 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GeoFeatureControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GeoFeatureControllerTest.java @@ -29,8 +29,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.intellij.lang.annotations.Language; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GeoJsonImportControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GeoJsonImportControllerTest.java index cee7c0fb3b77..f78a0455f6f8 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GeoJsonImportControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GeoJsonImportControllerTest.java @@ -28,7 +28,7 @@ package org.hisp.dhis.webapi.controller; import static java.lang.String.format; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -41,11 +41,11 @@ import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.attribute.Attribute; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonNumber; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonImportConflict; import org.hisp.dhis.test.webapi.json.domain.JsonImportCount; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistAttributeControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistAttributeControllerTest.java index 052fc15254be..b1f42531e340 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistAttributeControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistAttributeControllerTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -36,13 +36,13 @@ import java.util.function.Function; import org.hisp.dhis.attribute.Attribute; import org.hisp.dhis.common.ValueType; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonMap; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.jsontree.JsonString; import org.hisp.dhis.jsontree.JsonValue; -import org.hisp.dhis.test.web.HttpStatus; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistCsvControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistCsvControllerTest.java index b8101b63990c..33c90da88112 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistCsvControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistCsvControllerTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Accept; +import static org.hisp.dhis.http.HttpClientAdapter.Accept; import static org.junit.jupiter.api.Assertions.assertLinesMatch; import java.util.List; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistFieldsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistFieldsControllerTest.java index b5506a3c7db1..c921a33e94d0 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistFieldsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistFieldsControllerTest.java @@ -29,17 +29,17 @@ import static java.util.Arrays.asList; import static java.util.Collections.singletonList; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.utils.Assertions.assertContainsOnly; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Set; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.jsontree.JsonString; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonUserGroup; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistFilterControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistFilterControllerTest.java index 41ec9ac961a5..18552e0634bb 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistFilterControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistFilterControllerTest.java @@ -32,10 +32,10 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.List; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.hisp.dhis.user.User; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistPagerControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistPagerControllerTest.java index a5c5605585d8..cd5ed7b08604 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistPagerControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistPagerControllerTest.java @@ -30,10 +30,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonNodeType; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistPostgresControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistPostgresControllerTest.java index 75152361e6b2..4cec922207ae 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistPostgresControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistPostgresControllerTest.java @@ -27,13 +27,13 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Body; import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.user.User; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistValidationControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistValidationControllerTest.java index 12512018fde3..b756267a1abb 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistValidationControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/GistValidationControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/IdentifiableObjectControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/IdentifiableObjectControllerTest.java index d0ceabd3aa2f..1803b6585614 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/IdentifiableObjectControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/IdentifiableObjectControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/IndicatorControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/IndicatorControllerTest.java index 19a6cd803219..953a89b11c5a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/IndicatorControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/IndicatorControllerTest.java @@ -30,10 +30,10 @@ import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonMixed; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/InterpretationControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/InterpretationControllerTest.java index 2765f1967ec4..091036ef54cb 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/InterpretationControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/InterpretationControllerTest.java @@ -27,19 +27,19 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import org.hisp.dhis.common.IdentifiableObjectManager; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.interpretation.Interpretation; import org.hisp.dhis.interpretation.InterpretationService; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.visualization.Visualization; import org.hisp.dhis.visualization.VisualizationService; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/JobConfigurationControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/JobConfigurationControllerTest.java index 6a437cae875f..c2f2b294d175 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/JobConfigurationControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/JobConfigurationControllerTest.java @@ -28,8 +28,8 @@ package org.hisp.dhis.webapi.controller; import static java.lang.String.format; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.utils.Assertions.assertContainsOnly; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -42,6 +42,7 @@ import java.util.List; import java.util.Map; import java.util.function.Consumer; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonBuilder; import org.hisp.dhis.jsontree.JsonBuilder.JsonObjectBuilder; import org.hisp.dhis.jsontree.JsonNode; @@ -49,7 +50,6 @@ import org.hisp.dhis.scheduling.JobStatus; import org.hisp.dhis.scheduling.JobType; import org.hisp.dhis.scheduling.SchedulingType; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonJobConfiguration; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/JobConfigurationRunErrorsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/JobConfigurationRunErrorsControllerTest.java index b2199c737b45..d5514183393e 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/JobConfigurationRunErrorsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/JobConfigurationRunErrorsControllerTest.java @@ -28,14 +28,15 @@ package org.hisp.dhis.webapi.controller; import static java.time.Duration.ofSeconds; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.security.Authorities.F_JOB_LOG_READ; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import java.time.Duration; import java.util.List; import java.util.function.BooleanSupplier; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonMixed; @@ -44,7 +45,6 @@ import org.hisp.dhis.scheduling.JobRunErrors; import org.hisp.dhis.scheduling.JobStatus; import org.hisp.dhis.scheduling.JobType; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonJobConfiguration; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/JobSchedulerControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/JobSchedulerControllerTest.java index e5911abe927d..671f594529b6 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/JobSchedulerControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/JobSchedulerControllerTest.java @@ -28,7 +28,7 @@ package org.hisp.dhis.webapi.controller; import static java.lang.String.format; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -37,10 +37,10 @@ import java.util.List; import java.util.Set; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.jsontree.JsonString; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LegendSetControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LegendSetControllerTest.java index c524b988be70..5abb460f4c45 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LegendSetControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LegendSetControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LocaleControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LocaleControllerTest.java index 0b07f01f2acf..feb9710411e2 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LocaleControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LocaleControllerTest.java @@ -27,14 +27,14 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.List; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebLocale; import org.junit.jupiter.api.AfterEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LockExceptionControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LockExceptionControllerTest.java index 05845b28adc5..17d5ef6f3f66 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LockExceptionControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LockExceptionControllerTest.java @@ -28,10 +28,10 @@ package org.hisp.dhis.webapi.controller; import static java.lang.String.format; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LoginConfigControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LoginConfigControllerTest.java index 21a19ad35784..463d37d7012f 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LoginConfigControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/LoginConfigControllerTest.java @@ -27,13 +27,14 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import java.util.Properties; import org.hisp.dhis.external.conf.ConfigurationKey; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonMap; import org.hisp.dhis.jsontree.JsonObject; @@ -45,7 +46,6 @@ import org.hisp.dhis.setting.SystemSettingsService; import org.hisp.dhis.setting.SystemSettingsTranslationService; import org.hisp.dhis.system.SystemService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.intellij.lang.annotations.Language; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MaintenanceControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MaintenanceControllerTest.java index f24d4f3613bc..2629ad9d61f2 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MaintenanceControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MaintenanceControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import org.hisp.dhis.common.CodeGenerator; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MapControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MapControllerTest.java index 056bda5cf29d..1f4eca0cf8dd 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MapControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MapControllerTest.java @@ -27,13 +27,13 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MeControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MeControllerTest.java index b2fe19519cd2..2b342076fd48 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MeControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MeControllerTest.java @@ -28,11 +28,11 @@ package org.hisp.dhis.webapi.controller; import static java.util.Collections.singletonList; +import static org.hisp.dhis.http.HttpAssertions.assertSeries; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; import static org.hisp.dhis.security.apikey.ApiKeyTokenGenerator.generatePersonalAccessToken; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; -import static org.hisp.dhis.test.web.WebClientUtils.assertSeries; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNull; @@ -40,13 +40,13 @@ import java.util.concurrent.TimeUnit; import org.hisp.dhis.attribute.AttributeValues; +import org.hisp.dhis.http.HttpStatus; +import org.hisp.dhis.http.HttpStatus.Series; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.jsontree.JsonValue; import org.hisp.dhis.security.apikey.ApiKeyTokenGenerator; import org.hisp.dhis.security.apikey.ApiTokenStore; -import org.hisp.dhis.test.web.HttpStatus; -import org.hisp.dhis.test.web.HttpStatus.Series; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonUser; import org.hisp.dhis.user.CurrentUserUtil; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MessageConversationControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MessageConversationControllerTest.java index b6e11ff95556..8052dd6d5899 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MessageConversationControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MessageConversationControllerTest.java @@ -28,13 +28,13 @@ package org.hisp.dhis.webapi.controller; import static com.google.common.collect.Sets.newHashSet; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import org.hisp.dhis.common.IdentifiableObjectManager; import org.hisp.dhis.configuration.Configuration; import org.hisp.dhis.configuration.ConfigurationService; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.user.User; import org.hisp.dhis.user.UserGroup; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataFilterControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataFilterControllerTest.java index afc7a46dcd1b..4017f7243680 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataFilterControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataFilterControllerTest.java @@ -27,13 +27,13 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import org.hisp.dhis.attribute.Attribute; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataImportExportControllerIntegrationTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataImportExportControllerIntegrationTest.java index 272f98ea6310..01954882233c 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataImportExportControllerIntegrationTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataImportExportControllerIntegrationTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; import static org.hisp.dhis.test.utils.Assertions.assertStartsWith; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataImportExportControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataImportExportControllerTest.java index 6ba736484645..f40b185ef7f1 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataImportExportControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataImportExportControllerTest.java @@ -27,8 +27,8 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -48,12 +48,12 @@ import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementService; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonMixed; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.jsontree.JsonValue; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonAttributeValue; import org.hisp.dhis.test.webapi.json.domain.JsonDataElement; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataWorkflowControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataWorkflowControllerTest.java index 87c57d4e4123..d22e90259a95 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataWorkflowControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MetadataWorkflowControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -37,11 +37,11 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.metadata.MetadataProposalStatus; import org.hisp.dhis.metadata.MetadataProposalTarget; import org.hisp.dhis.metadata.MetadataProposalType; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonErrorReport; import org.hisp.dhis.test.webapi.json.domain.JsonOrganisationUnit; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MinMaxDataElementControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MinMaxDataElementControllerTest.java index 7e5e2eb68c1c..c65782a1a258 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MinMaxDataElementControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/MinMaxDataElementControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OpenApiControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OpenApiControllerTest.java index 2d473e203aef..3275f2dae27f 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OpenApiControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OpenApiControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller; +import static org.hisp.dhis.http.HttpClientAdapter.Accept; import static org.hisp.dhis.test.utils.Assertions.assertContains; import static org.hisp.dhis.test.utils.Assertions.assertGreaterOrEqual; import static org.hisp.dhis.test.utils.Assertions.assertLessOrEqual; -import static org.hisp.dhis.test.web.WebClient.Accept; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OptionControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OptionControllerTest.java index 822745b4f249..116770a383d2 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OptionControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OptionControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.List; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; import org.hisp.dhis.test.webapi.json.domain.JsonOptionSet; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OptionGroupControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OptionGroupControllerTest.java index f3ebc2ecc8d0..794003d85e72 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OptionGroupControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OptionGroupControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OrganisationUnitControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OrganisationUnitControllerTest.java index a6beb9219161..81e601a53f36 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OrganisationUnitControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OrganisationUnitControllerTest.java @@ -27,17 +27,16 @@ */ package org.hisp.dhis.webapi.controller; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.utils.Assertions.assertContainsOnly; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; -import static org.hisp.dhis.test.web.WebClientUtils.objectReference; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import java.util.List; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; import org.hisp.dhis.test.webapi.json.domain.JsonOrganisationUnit; @@ -261,7 +260,9 @@ private String addOrganisationUnit(String name, String parentId) { + "', 'shortName':'" + name + "', 'openingDate':'2021', 'parent': " - + objectReference(parentId) + + "{'id':'" + + parentId + + "'}" + " }")); } } diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OrganisationUnitGroupControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OrganisationUnitGroupControllerTest.java index 1037881bfd0c..8fc8d39a3fe4 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OrganisationUnitGroupControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OrganisationUnitGroupControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OrganisationUnitLocationControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OrganisationUnitLocationControllerTest.java index 9702684a8a80..611263519b8f 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OrganisationUnitLocationControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/OrganisationUnitLocationControllerTest.java @@ -27,13 +27,13 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonBoolean; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PdfFormControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PdfFormControllerTest.java index 628c3c51842e..880132122af6 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PdfFormControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PdfFormControllerTest.java @@ -32,9 +32,9 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import org.hisp.dhis.dataset.DataSet; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.period.PeriodType; import org.hisp.dhis.period.PeriodTypeEnum; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PeriodTypeControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PeriodTypeControllerTest.java index 735b979122b9..2ad2e254977b 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PeriodTypeControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PeriodTypeControllerTest.java @@ -32,9 +32,9 @@ import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonPeriodType; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PredictionControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PredictionControllerTest.java index 9de459977d74..70499558e26b 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PredictionControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PredictionControllerTest.java @@ -31,8 +31,8 @@ import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PredictorControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PredictorControllerTest.java index 7d06839f78c9..6b220c6a787c 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PredictorControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/PredictorControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.hisp.dhis.user.User; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramControllerIntegrationTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramControllerIntegrationTest.java index 1488aa90ea96..d049d7cb1471 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramControllerIntegrationTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramControllerIntegrationTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import com.fasterxml.jackson.core.JsonProcessingException; @@ -37,10 +37,10 @@ import java.util.stream.Collectors; import org.hisp.dhis.association.jdbc.JdbcOrgUnitAssociationsStore; import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.hisp.dhis.trackedentity.TrackedEntityAttribute; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramControllerTest.java index 7754cbb02774..812364bc3b41 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramControllerTest.java @@ -28,7 +28,7 @@ package org.hisp.dhis.webapi.controller; import static org.hisp.dhis.feedback.ErrorCode.E1005; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.hisp.dhis.test.webapi.TestUtils.getMatchingGroupFromPattern; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -41,8 +41,8 @@ import java.util.stream.Collectors; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonErrorReport; import org.hisp.dhis.test.webapi.json.domain.JsonObjectReport; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramIndicatorControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramIndicatorControllerTest.java index 6ed7d67171da..26f9f6d47bad 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramIndicatorControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramIndicatorControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.springframework.http.MediaType.TEXT_PLAIN_VALUE; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramMessageControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramMessageControllerTest.java index cbe035020213..f1ac6e3bf836 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramMessageControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramMessageControllerTest.java @@ -31,6 +31,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.common.collect.Sets; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.organisationunit.OrganisationUnit; @@ -38,7 +39,6 @@ import org.hisp.dhis.program.Event; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramStage; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.trackedentity.TrackedEntity; import org.hisp.dhis.webapi.controller.message.ProgramMessageController; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramRuleActionControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramRuleActionControllerTest.java index a2bc78df9002..9ed994fb1090 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramRuleActionControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramRuleActionControllerTest.java @@ -27,17 +27,17 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramStage; import org.hisp.dhis.programrule.ProgramRule; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonErrorReport; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramRuleControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramRuleControllerTest.java index 56c759b3e15a..b970275a8409 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramRuleControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramRuleControllerTest.java @@ -27,13 +27,13 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.program.Program; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonErrorReport; import org.hisp.dhis.test.webapi.json.domain.JsonImportSummary; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramSectionControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramSectionControllerTest.java index 71d5d0c7613f..9b102903edcd 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramSectionControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramSectionControllerTest.java @@ -27,13 +27,13 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramSection; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramStageControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramStageControllerTest.java index 02627bc1c43c..4bfc583a6f1c 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramStageControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ProgramStageControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonTypeReport; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/QueryControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/QueryControllerTest.java index de7af7d0e3c6..a6f9a48cccf1 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/QueryControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/QueryControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/RelationshipTypeControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/RelationshipTypeControllerTest.java index 5a4b1992dbbf..820a997b7ecd 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/RelationshipTypeControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/RelationshipTypeControllerTest.java @@ -27,13 +27,13 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.List; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonString; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/RequestInfoControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/RequestInfoControllerTest.java index a99a6981b515..dc6d74ae7dff 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/RequestInfoControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/RequestInfoControllerTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Header; +import static org.hisp.dhis.http.HttpClientAdapter.Header; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ResourceTableControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ResourceTableControllerTest.java index 99f6338d448d..a0c30af91590 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ResourceTableControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ResourceTableControllerTest.java @@ -30,7 +30,7 @@ import static org.hisp.dhis.test.utils.Assertions.assertStartsWith; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SchemaBasedControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SchemaBasedControllerTest.java index 0ba981a08dfa..d41ddcc3b5aa 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SchemaBasedControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SchemaBasedControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -45,10 +45,10 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Stream; import org.hisp.dhis.attribute.Attribute.ObjectType; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonGenerator; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SchemaControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SchemaControllerTest.java index 1a6bd0d0706f..c327f0326d05 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SchemaControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SchemaControllerTest.java @@ -33,8 +33,8 @@ import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonSchema; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SharingControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SharingControllerTest.java index c3376cd1b1b8..b3ae3cd5df0b 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SharingControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SharingControllerTest.java @@ -27,15 +27,15 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonNode; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonCategoryOption; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsCommandControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsCommandControllerTest.java index bebc5913f2c3..5dfd48309c67 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsCommandControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsCommandControllerTest.java @@ -30,9 +30,9 @@ import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertNotNull; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonMixed; import org.hisp.dhis.sms.incoming.IncomingSmsService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.user.User; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsGatewayControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsGatewayControllerTest.java index 47c5f4290597..0b2c1ccee839 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsGatewayControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsGatewayControllerTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; @@ -35,13 +35,13 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Set; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonMixed; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.sms.config.ClickatellGatewayConfig; import org.hisp.dhis.sms.config.GatewayAdministrationService; import org.hisp.dhis.sms.config.GenericHttpGatewayConfig; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsInboundControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsInboundControllerTest.java index 13851be4264e..1fad2629914d 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsInboundControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsInboundControllerTest.java @@ -29,9 +29,9 @@ import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.sms.incoming.IncomingSms; import org.hisp.dhis.sms.incoming.IncomingSmsService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.user.User; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsOutboundControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsOutboundControllerTest.java index a6c63f36e300..3d4157130a72 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsOutboundControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SmsOutboundControllerTest.java @@ -29,9 +29,9 @@ import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.sms.outbound.OutboundSms; import org.hisp.dhis.sms.outbound.OutboundSmsService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.user.User; import org.junit.jupiter.api.Disabled; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SqlViewControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SqlViewControllerTest.java index 33eea8f18af1..e8d1902675d0 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SqlViewControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SqlViewControllerTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; @@ -41,13 +41,13 @@ import org.hisp.dhis.external.conf.ConfigurationKey; import org.hisp.dhis.external.conf.DhisConfigurationProvider; import org.hisp.dhis.feedback.NotFoundException; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.scheduling.JobConfigurationService; import org.hisp.dhis.sqlview.SqlView; import org.hisp.dhis.sqlview.SqlViewQuery; import org.hisp.dhis.sqlview.SqlViewService; import org.hisp.dhis.system.grid.ListGrid; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.webapi.service.ContextService; import org.hisp.dhis.webapi.utils.ContextUtils; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SynchronizationControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SynchronizationControllerTest.java index 19b8f11b7cf5..1482e42fcf2c 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SynchronizationControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SynchronizationControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonMixed; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SystemControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SystemControllerTest.java index 8e299c2e685e..2eb978c3db7a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SystemControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SystemControllerTest.java @@ -32,9 +32,9 @@ import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SystemSettingsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SystemSettingsControllerTest.java index e9f3c66656e2..96080372f1bd 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SystemSettingsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/SystemSettingsControllerTest.java @@ -27,18 +27,18 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClient.Accept; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClient.ContentType; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Accept; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpClientAdapter.ContentType; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.setting.SystemSettings; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.webapi.utils.ContextUtils; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/TrackedEntityAttributeControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/TrackedEntityAttributeControllerTest.java index 0d94533f25ce..09c631127f70 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/TrackedEntityAttributeControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/TrackedEntityAttributeControllerTest.java @@ -35,6 +35,7 @@ import java.util.stream.Collectors; import org.hisp.dhis.common.IdentifiableObjectManager; import org.hisp.dhis.common.ValueType; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.jsontree.JsonString; import org.hisp.dhis.organisationunit.OrganisationUnit; @@ -42,7 +43,6 @@ import org.hisp.dhis.program.EnrollmentStatus; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramTrackedEntityAttribute; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.trackedentity.TrackedEntity; import org.hisp.dhis.trackedentity.TrackedEntityAttribute; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/TwoFactorControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/TwoFactorControllerTest.java index a59ce28a59ac..2015e98110f8 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/TwoFactorControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/TwoFactorControllerTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.controller; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.hisp.dhis.user.UserService.TWO_FACTOR_CODE_APPROVAL_PREFIX; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -35,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertNull; import java.util.List; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.user.CurrentUserUtil; import org.hisp.dhis.user.SystemUser; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/UserAccountControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/UserAccountControllerTest.java index 104d435f1028..3f8035cd3fa2 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/UserAccountControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/UserAccountControllerTest.java @@ -44,12 +44,12 @@ import org.hisp.dhis.common.auth.UserRegistrationParams; import org.hisp.dhis.external.conf.ConfigurationKey; import org.hisp.dhis.external.conf.DhisConfigurationProvider; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.message.MessageSender; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.outboundmessage.OutboundMessage; import org.hisp.dhis.security.PasswordManager; import org.hisp.dhis.setting.SystemSettingsService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonUser; import org.hisp.dhis.user.User; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/UserControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/UserControllerTest.java index 71b35c46c0e9..e8d97fe77078 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/UserControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/UserControllerTest.java @@ -29,10 +29,10 @@ import static java.util.Collections.emptySet; import static org.hisp.dhis.external.conf.ConfigurationKey.LINKED_ACCOUNTS_ENABLED; -import static org.hisp.dhis.test.web.HttpStatus.Series.SUCCESSFUL; -import static org.hisp.dhis.test.web.WebClient.Accept; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Accept; +import static org.hisp.dhis.http.HttpClientAdapter.Body; +import static org.hisp.dhis.http.HttpStatus.Series.SUCCESSFUL; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -50,6 +50,7 @@ import org.hisp.dhis.common.BaseIdentifiableObject; import org.hisp.dhis.external.conf.DhisConfigurationProvider; import org.hisp.dhis.feedback.ErrorCode; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.message.MessageSender; @@ -57,7 +58,6 @@ import org.hisp.dhis.organisationunit.OrganisationUnitService; import org.hisp.dhis.outboundmessage.OutboundMessage; import org.hisp.dhis.setting.SystemSettingsService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonErrorReport; import org.hisp.dhis.test.webapi.json.domain.JsonImportSummary; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/UserLookupControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/UserLookupControllerTest.java index f1235ae470fa..7ea050d28688 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/UserLookupControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/UserLookupControllerTest.java @@ -28,15 +28,15 @@ package org.hisp.dhis.webapi.controller; import static java.util.stream.Collectors.toSet; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.List; import java.util.Set; import java.util.function.BiConsumer; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonList; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; import org.hisp.dhis.test.webapi.json.domain.JsonUser; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ValidationControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ValidationControllerTest.java index a0267e2516ea..0bafdebd0f3a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ValidationControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ValidationControllerTest.java @@ -30,7 +30,7 @@ import static org.hisp.dhis.test.utils.Assertions.assertStartsWith; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ValidationRuleControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ValidationRuleControllerTest.java index 5d066762fe9e..5cbec9502f07 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ValidationRuleControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/ValidationRuleControllerTest.java @@ -29,7 +29,7 @@ import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/VisualizationControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/VisualizationControllerTest.java index 49b363d2a149..b6d1c41a690b 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/VisualizationControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/VisualizationControllerTest.java @@ -30,15 +30,16 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; -import static org.hisp.dhis.test.web.HttpStatus.CONFLICT; -import static org.hisp.dhis.test.web.HttpStatus.CREATED; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpStatus.CONFLICT; +import static org.hisp.dhis.http.HttpStatus.CREATED; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; import java.nio.file.Path; import org.hisp.dhis.common.IdentifiableObjectManager; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.indicator.Indicator; import org.hisp.dhis.indicator.IndicatorType; import org.hisp.dhis.jsontree.JsonList; @@ -46,7 +47,6 @@ import org.hisp.dhis.jsontree.JsonNode; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.program.Program; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonImportSummary; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/attribute/TrackedEntityAttributeControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/attribute/TrackedEntityAttributeControllerTest.java index eeb1d5b1178d..5b2de9efae21 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/attribute/TrackedEntityAttributeControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/attribute/TrackedEntityAttributeControllerTest.java @@ -27,11 +27,11 @@ */ package org.hisp.dhis.webapi.controller.attribute; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import org.hisp.dhis.common.Objects; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.schema.descriptors.TrackedEntityAttributeSchemaDescriptor; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.TestUtils; import org.hisp.dhis.textpattern.TextPattern; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/AbstractDataIntegrityIntegrationTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/AbstractDataIntegrityIntegrationTest.java index 2b7bfe12e1ff..afb0389b2a27 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/AbstractDataIntegrityIntegrationTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/AbstractDataIntegrityIntegrationTest.java @@ -27,17 +27,18 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Set; import java.util.stream.Collectors; +import javax.annotation.Nonnull; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegrityDetails; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegrityDetails.JsonDataIntegrityIssue; @@ -320,6 +321,7 @@ protected final String getDefaultCOC() { return ccDefault.getArray("categoryOptionCombos").getString(0).string(); } + @Nonnull @Override public HttpResponse GET(String url, Object... args) { return super.GET(url, args); diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoriesControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoriesControllerTest.java index 46a3c8791294..2848a3b04495 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoriesControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoriesControllerTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; @@ -41,7 +41,7 @@ import org.hisp.dhis.category.CategoryService; import org.hisp.dhis.category.CategoryStore; import org.hisp.dhis.common.CodeGenerator; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegrityDetails; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegritySummary; import org.hisp.dhis.webapi.controller.DataIntegrityController; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoriesDuplicatedControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoriesDuplicatedControllerTest.java index c7ec6eea07bf..e009cea12a02 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoriesDuplicatedControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoriesDuplicatedControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryComboInvalidControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryComboInvalidControllerTest.java index b289e8801a3d..cb0e5ab48a4a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryComboInvalidControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryComboInvalidControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryComboUnusedControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryComboUnusedControllerTest.java index 2e9e8d480a15..4b76d4dec9c6 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryComboUnusedControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryComboUnusedControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryNoOptionsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryNoOptionsControllerTest.java index e232c74721ad..1a54e14b2bca 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryNoOptionsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryNoOptionsControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionComboDisjointControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionComboDisjointControllerTest.java index fb31761a16ec..7db90f850c7a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionComboDisjointControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionComboDisjointControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonCategoryOptionCombo; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionComboNoCatComboControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionComboNoCatComboControllerTest.java index 1065d6dcb730..5d2c266d9d36 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionComboNoCatComboControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionComboNoCatComboControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionComboWrongCardinalityControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionComboWrongCardinalityControllerTest.java index 9622bf4c9728..5603bdd29276 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionComboWrongCardinalityControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionComboWrongCardinalityControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionGroupSetExcessGroupMembershipControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionGroupSetExcessGroupMembershipControllerTest.java index 26dab3c41e8c..af1ee21df200 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionGroupSetExcessGroupMembershipControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionGroupSetExcessGroupMembershipControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionGroupSetIncompleteControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionGroupSetIncompleteControllerTest.java index 286a9429a918..ac4a388b3d93 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionGroupSetIncompleteControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionGroupSetIncompleteControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionNoCategoryControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionNoCategoryControllerTest.java index 764e70a0bb19..a8743d3bed09 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionNoCategoryControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityCategoryOptionNoCategoryControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAbandonedControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAbandonedControllerTest.java index e10569e8683e..d97db75f196a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAbandonedControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAbandonedControllerTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.time.ZonedDateTime; import java.util.Date; @@ -35,8 +35,8 @@ import org.hisp.dhis.common.ValueType; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementDomain; -import org.hisp.dhis.test.web.HttpStatus; -import org.hisp.dhis.test.web.WebClient; +import org.hisp.dhis.http.HttpClientAdapter; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** @@ -139,7 +139,7 @@ void setUpTest() { POST( "/users/{id}/organisationUnits", getCurrentUser().getUid(), - WebClient.Body("{'additions':[{'id':'" + orgUnitId + "'}]}"))); + HttpClientAdapter.Body("{'additions':[{'id':'" + orgUnitId + "'}]}"))); // Add some data to dataElementB assertStatus( HttpStatus.CREATED, diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAggregateExcessGroupMembershipControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAggregateExcessGroupMembershipControllerTest.java index 095c2cabda98..92cdfa956ba4 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAggregateExcessGroupMembershipControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAggregateExcessGroupMembershipControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAggregateNotInDataElementGroupControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAggregateNotInDataElementGroupControllerTest.java index e2f5a41f1ece..a13fb87b3078 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAggregateNotInDataElementGroupControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAggregateNotInDataElementGroupControllerTest.java @@ -27,11 +27,11 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonDataElement; import org.hisp.dhis.test.webapi.json.domain.JsonDataElementGroup; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAggregationOperatorControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAggregationOperatorControllerTest.java index e5808a20a627..12d1fe2882f2 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAggregationOperatorControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsAggregationOperatorControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsDifferentPeriodTypesControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsDifferentPeriodTypesControllerTest.java index 672b13b60fb6..f24000610e0e 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsDifferentPeriodTypesControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsDifferentPeriodTypesControllerTest.java @@ -29,14 +29,14 @@ import static java.util.stream.Collectors.toUnmodifiableSet; import static org.hisp.dhis.common.CodeGenerator.generateUid; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.HashSet; import java.util.Set; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonString; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegrityDetails; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsNoAnalysisControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsNoAnalysisControllerTest.java index d3b7d0bacba9..7b90546990ea 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsNoAnalysisControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsNoAnalysisControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsNoDataControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsNoDataControllerTest.java index 872773e02f17..a5a1da105c26 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsNoDataControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsNoDataControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; -import org.hisp.dhis.test.web.WebClient; +import org.hisp.dhis.http.HttpClientAdapter; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** @@ -122,6 +122,6 @@ void setUpTest() { POST( "/users/{id}/organisationUnits", getCurrentUser().getUid(), - WebClient.Body("{'additions':[{'id':'" + orgUnitId + "'}]}"))); + HttpClientAdapter.Body("{'additions':[{'id':'" + orgUnitId + "'}]}"))); } } diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsNoDatasetTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsNoDatasetTest.java index 89205cd674f0..5471a9d6d8ad 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsNoDatasetTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDataElementsNoDatasetTest.java @@ -28,9 +28,9 @@ package org.hisp.dhis.webapi.controller.dataintegrity; import static org.hisp.dhis.common.CodeGenerator.generateUid; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDatasetsEmptyControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDatasetsEmptyControllerTest.java index 104fd44f4b66..82133bc9675a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDatasetsEmptyControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDatasetsEmptyControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDatasetsNoOrgUnitsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDatasetsNoOrgUnitsControllerTest.java index 4d701607ccc2..858ae3704501 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDatasetsNoOrgUnitsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDatasetsNoOrgUnitsControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDefaultChecksTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDefaultChecksTest.java index 6386a5b89bc2..d37b6bc1ed3a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDefaultChecksTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDefaultChecksTest.java @@ -27,15 +27,15 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegrityCheck; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegritySummary; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDetailsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDetailsControllerTest.java index 1bdcfd01cb59..8c9bd5593fea 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDetailsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityDetailsControllerTest.java @@ -27,16 +27,16 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; import org.hisp.dhis.dataintegrity.DataIntegrityCheckType; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegrityDetails; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegrityDetails.JsonDataIntegrityIssue; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeCategoryOptionGroupSetControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeCategoryOptionGroupSetControllerTest.java index 55e1726bd150..8f65d57f72be 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeCategoryOptionGroupSetControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeCategoryOptionGroupSetControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeCategoryOptionGroupsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeCategoryOptionGroupsControllerTest.java index cb6ea8997c63..ebc9b009f51c 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeCategoryOptionGroupsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeCategoryOptionGroupsControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeDataElementGroupsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeDataElementGroupsControllerTest.java index f8bb61df972d..c164f9c9fcfd 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeDataElementGroupsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeDataElementGroupsControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeIndicatorGroupSetsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeIndicatorGroupSetsControllerTest.java index ea8c7883eab7..f7d3788cae18 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeIndicatorGroupSetsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeIndicatorGroupSetsControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeIndicatorGroupsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeIndicatorGroupsControllerTest.java index d2cd22ad1b56..44adf7fd038c 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeIndicatorGroupsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeIndicatorGroupsControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeOrganisationUnitGroupsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeOrganisationUnitGroupsControllerTest.java index 84decdaa23d8..6bd36faded56 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeOrganisationUnitGroupsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeOrganisationUnitGroupsControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeUserGroupsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeUserGroupsControllerTest.java index cfd5a28ae9e6..05e98fc7f676 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeUserGroupsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeUserGroupsControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.user.User; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeValidationRuleGroupsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeValidationRuleGroupsControllerTest.java index 9534e8133ba9..72c07e6f4849 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeValidationRuleGroupsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityGroupSizeValidationRuleGroupsControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsDuplicatedFactorsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsDuplicatedFactorsControllerTest.java index 80d4dbeffe73..43013a2868fa 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsDuplicatedFactorsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsDuplicatedFactorsControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsDuplicatedTermsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsDuplicatedTermsControllerTest.java index 84c6f0453796..d64a95165740 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsDuplicatedTermsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsDuplicatedTermsControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Set; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegrityDetails; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsExactDuplicatesControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsExactDuplicatesControllerTest.java index 3ad2f7696ade..623229426b6b 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsExactDuplicatesControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsExactDuplicatesControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsNoAnalysisControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsNoAnalysisControllerTest.java index 8f237ecf802f..330141319beb 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsNoAnalysisControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsNoAnalysisControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsNotGroupedControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsNotGroupedControllerTest.java index 76e168105b62..1bf4b0f5e64a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsNotGroupedControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsNotGroupedControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonIndicator; import org.hisp.dhis.test.webapi.json.domain.JsonIndicatorGroup; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsViolatingExclusiveGroupSetsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsViolatingExclusiveGroupSetsControllerTest.java index 602bf38db08e..0eb1fc903acd 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsViolatingExclusiveGroupSetsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityIndicatorsViolatingExclusiveGroupSetsControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionGroupsWithoutOptions.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionGroupsWithoutOptions.java index 18e8ca833ecf..ad6eaf6e0da3 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionGroupsWithoutOptions.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionGroupsWithoutOptions.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; class DataIntegrityOptionGroupsWithoutOptions extends AbstractDataIntegrityIntegrationTest { diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionSetNoOptionsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionSetNoOptionsControllerTest.java index 1e19a2836855..6259e77ee985 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionSetNoOptionsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionSetNoOptionsControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonOption; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionSetsNotUsedControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionSetsNotUsedControllerTest.java index 45b1280b3e45..536ce593f170 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionSetsNotUsedControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionSetsNotUsedControllerTest.java @@ -27,12 +27,12 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonDataElement; import org.hisp.dhis.test.webapi.json.domain.JsonOption; import org.hisp.dhis.test.webapi.json.domain.JsonOptionSet; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionSetsWrongSortOrderControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionSetsWrongSortOrderControllerTest.java index 99b6bced52f2..2a0217e8f9e7 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionSetsWrongSortOrderControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOptionSetsWrongSortOrderControllerTest.java @@ -27,18 +27,18 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.Set; import java.util.stream.Collectors; import org.hisp.dhis.common.ValueType; import org.hisp.dhis.feedback.ConflictException; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.option.Option; import org.hisp.dhis.option.OptionService; import org.hisp.dhis.option.OptionSet; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonOption; import org.hisp.dhis.test.webapi.json.domain.JsonOptionSet; import org.junit.jupiter.api.Disabled; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitCompulsoryGroupControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitCompulsoryGroupControllerTest.java index 2378c3cbffc3..9675b40f2d40 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitCompulsoryGroupControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitCompulsoryGroupControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitExcessGroupsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitExcessGroupsControllerTest.java index f8ef62bdbdcc..8fda7b0a858e 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitExcessGroupsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitExcessGroupsControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitNamesMultipleSpacesControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitNamesMultipleSpacesControllerTest.java index 03d8f077f0d7..3a43e4418453 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitNamesMultipleSpacesControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitNamesMultipleSpacesControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitNullIslandControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitNullIslandControllerTest.java index fcb96d698c58..2ea40dfeaebd 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitNullIslandControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitNullIslandControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitOpenClosedDateControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitOpenClosedDateControllerTest.java index 841d8c32a948..8cccdb45822a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitOpenClosedDateControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitOpenClosedDateControllerTest.java @@ -27,11 +27,11 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitService; -import org.hisp.dhis.test.web.HttpStatus; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsInvalidGeometryControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsInvalidGeometryControllerTest.java index ad171684ae5d..5a3f41c85d8b 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsInvalidGeometryControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsInvalidGeometryControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsMultipleRootsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsMultipleRootsControllerTest.java index 4aff1236ac4b..a4e983733a70 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsMultipleRootsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsMultipleRootsControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsNoGeometryControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsNoGeometryControllerTest.java index aceed0ca161d..afb1ec43bf5a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsNoGeometryControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsNoGeometryControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsNoGroupsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsNoGroupsControllerTest.java index 92d54b6312d4..4cf8eb27668f 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsNoGroupsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsNoGroupsControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsNotContainedByParentControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsNotContainedByParentControllerTest.java index 59cda925689a..48b22643ae4f 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsNotContainedByParentControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsNotContainedByParentControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsSameNameAndParentControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsSameNameAndParentControllerTest.java index 109e31998110..8510fb30678e 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsSameNameAndParentControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsSameNameAndParentControllerTest.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import java.util.Set; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsTrailingSpacesControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsTrailingSpacesControllerTest.java index 851bbd4e29de..3f2e9664e0a3 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsTrailingSpacesControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrganisationUnitsTrailingSpacesControllerTest.java @@ -27,14 +27,14 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.Set; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitService; -import org.hisp.dhis.test.web.HttpStatus; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrphanedOrganisationUnitControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrphanedOrganisationUnitControllerTest.java index 12f99702d844..e46e0d682140 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrphanedOrganisationUnitControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityOrphanedOrganisationUnitControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityPushAnalysisNoRecipientsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityPushAnalysisNoRecipientsControllerTest.java index c238f488623f..92a628a8f2cb 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityPushAnalysisNoRecipientsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityPushAnalysisNoRecipientsControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; class DataIntegrityPushAnalysisNoRecipientsControllerTest diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityReportControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityReportControllerTest.java index 30fcbc78954c..4e762bc1a203 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityReportControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityReportControllerTest.java @@ -30,21 +30,19 @@ import static java.util.Arrays.asList; import static java.util.Collections.singletonList; import static org.hisp.dhis.common.CodeGenerator.generateUid; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.utils.Assertions.assertContainsOnly; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; -import static org.hisp.dhis.test.web.WebClientUtils.objectReference; -import static org.hisp.dhis.test.web.WebClientUtils.objectReferences; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.List; import java.util.Map; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonNodeType; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.jsontree.JsonString; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitStore; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegrityReport; import org.hisp.dhis.webapi.controller.DataIntegrityController; import org.junit.jupiter.api.Test; @@ -641,4 +639,21 @@ private JsonDataIntegrityReport getDataIntegrityReport(String url) { .content() .as(JsonDataIntegrityReport.class); } + + private static String objectReferences(String... uids) { + StringBuilder str = new StringBuilder(); + str.append('['); + for (String uid : uids) { + if (str.length() > 1) { + str.append(','); + } + str.append(objectReference(uid)); + } + str.append(']'); + return str.toString(); + } + + private static String objectReference(String uid) { + return String.format("{\"id\":\"%s\"}", uid); + } } diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegritySharedCategoryOptionsInCatComboControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegritySharedCategoryOptionsInCatComboControllerTest.java index 7ea78d7613c9..7190d121adbd 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegritySharedCategoryOptionsInCatComboControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegritySharedCategoryOptionsInCatComboControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegritySummaryControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegritySummaryControllerTest.java index f127f7a7aa83..d49763115149 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegritySummaryControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegritySummaryControllerTest.java @@ -27,16 +27,16 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; import org.hisp.dhis.dataintegrity.DataIntegrityCheckType; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonMap; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegritySummary; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.hisp.dhis.webapi.controller.DataIntegrityController; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUserRolesNoAuthorities.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUserRolesNoAuthorities.java index 9427d536a1d2..4861ab9ba514 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUserRolesNoAuthorities.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUserRolesNoAuthorities.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; class DataIntegrityUserRolesNoAuthorities extends AbstractDataIntegrityIntegrationTest { diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUserRolesNoUsers.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUserRolesNoUsers.java index 2cea0bf50644..3cf64296ddde 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUserRolesNoUsers.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUserRolesNoUsers.java @@ -27,10 +27,10 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegritySummary; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUsersCaptureOrgUnitNotInTeiSearchHierarchy.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUsersCaptureOrgUnitNotInTeiSearchHierarchy.java index cacd61845365..a4ca75ff856e 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUsersCaptureOrgUnitNotInTeiSearchHierarchy.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUsersCaptureOrgUnitNotInTeiSearchHierarchy.java @@ -28,14 +28,14 @@ package org.hisp.dhis.webapi.controller.dataintegrity; import static java.util.stream.Collectors.toUnmodifiableSet; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Set; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonString; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegrityDetails; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUsersCaptureOrgunitNotInDataView.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUsersCaptureOrgunitNotInDataView.java index 4474533cf8a4..b39cbd132c48 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUsersCaptureOrgunitNotInDataView.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityUsersCaptureOrgunitNotInDataView.java @@ -28,14 +28,14 @@ package org.hisp.dhis.webapi.controller.dataintegrity; import static java.util.stream.Collectors.toUnmodifiableSet; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Set; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonString; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.json.domain.JsonDataIntegrityDetails; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityValidationRulesMissingStrategyControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityValidationRulesMissingStrategyControllerTest.java index ef00e4da3c22..eec99179f20d 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityValidationRulesMissingStrategyControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityValidationRulesMissingStrategyControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityValidationRulesWithoutGroupsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityValidationRulesWithoutGroupsControllerTest.java index 7638a103d4c1..65f7b74723d3 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityValidationRulesWithoutGroupsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/dataintegrity/DataIntegrityValidationRulesWithoutGroupsControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.dataintegrity; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.junit.jupiter.api.Test; /** diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/deduplication/DeduplicationControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/deduplication/DeduplicationControllerTest.java index 0a45a11af469..b9ea883d7da3 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/deduplication/DeduplicationControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/deduplication/DeduplicationControllerTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.deduplication; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.utils.Assertions.assertContainsOnly; import static org.hisp.dhis.test.utils.Assertions.assertStartsWith; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import static org.hisp.dhis.webapi.controller.tracker.JsonAssertions.assertHasNoMember; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -38,9 +38,9 @@ import java.util.List; import org.hisp.dhis.common.CodeGenerator; import org.hisp.dhis.common.IdentifiableObjectManager; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.trackedentity.TrackedEntity; import org.hisp.dhis.trackedentity.TrackedEntityType; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/event/ProgramNotificationInstanceControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/event/ProgramNotificationInstanceControllerTest.java index 05d201fcedb7..8fccab5dc1bb 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/event/ProgramNotificationInstanceControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/event/ProgramNotificationInstanceControllerTest.java @@ -34,6 +34,7 @@ import com.google.common.collect.Sets; import java.util.List; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Enrollment; @@ -42,7 +43,6 @@ import org.hisp.dhis.program.ProgramStage; import org.hisp.dhis.program.notification.ProgramNotificationInstance; import org.hisp.dhis.program.notification.ProgramNotificationInstanceService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; import org.hisp.dhis.trackedentity.TrackedEntity; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/event/ProgramNotificationTemplateControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/event/ProgramNotificationTemplateControllerTest.java index c94d2ca4a0a5..4cbe2a3c7168 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/event/ProgramNotificationTemplateControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/event/ProgramNotificationTemplateControllerTest.java @@ -36,13 +36,13 @@ import java.util.Set; import org.hisp.dhis.common.CodeGenerator; import org.hisp.dhis.common.IdentifiableObjectManager; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramStage; import org.hisp.dhis.program.notification.ProgramNotificationTemplate; import org.hisp.dhis.program.notification.ProgramNotificationTemplateService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonIdentifiableObject; import org.hisp.dhis.webapi.controller.tracker.JsonPage; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/icon/IconControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/icon/IconControllerTest.java index af6b0fde59cd..593ddbf5ab32 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/icon/IconControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/icon/IconControllerTest.java @@ -45,10 +45,10 @@ import org.hisp.dhis.fileresource.FileResourceDomain; import org.hisp.dhis.fileresource.FileResourceService; import org.hisp.dhis.fileresource.FileResourceStorageStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.icon.AddIconRequest; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonIcon; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/metadata/MetadataImportIntegrationTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/metadata/MetadataImportIntegrationTest.java index 085c2ee106cf..bee4d32dee5a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/metadata/MetadataImportIntegrationTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/metadata/MetadataImportIntegrationTest.java @@ -32,7 +32,7 @@ import java.nio.file.Path; import org.hisp.dhis.feedback.ErrorCode; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonErrorReport; import org.hisp.dhis.test.webapi.json.domain.JsonImportSummary; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/programstageworkinglist/ProgramStageWorkingListControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/programstageworkinglist/ProgramStageWorkingListControllerTest.java index 7401895451ee..8c4094c21d04 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/programstageworkinglist/ProgramStageWorkingListControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/programstageworkinglist/ProgramStageWorkingListControllerTest.java @@ -27,8 +27,8 @@ */ package org.hisp.dhis.webapi.controller.programstageworkinglist; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.utils.Assertions.assertContains; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -36,8 +36,8 @@ import java.util.function.Consumer; import java.util.stream.Stream; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonArray; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.webapi.controller.ProgramStageWorkingListController; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/security/AuthenticationControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/security/AuthenticationControllerTest.java index 3a11368dbee6..8c8adcc44be9 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/security/AuthenticationControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/security/AuthenticationControllerTest.java @@ -34,8 +34,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import java.util.Calendar; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.setting.SystemSettingsService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.AuthenticationApiTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonLoginResponse; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/security/ImpersonateUserControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/security/ImpersonateUserControllerTest.java index 9be1a49911fa..624b481309af 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/security/ImpersonateUserControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/security/ImpersonateUserControllerTest.java @@ -32,8 +32,8 @@ import java.util.Properties; import org.hisp.dhis.external.conf.ConfigurationKey; import org.hisp.dhis.external.conf.DhisConfigurationProvider; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.config.H2DhisConfigurationProvider; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonImpersonateUserResponse; import org.hisp.dhis.test.webapi.json.domain.JsonUser; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/ExportControllerPaginationTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/ExportControllerPaginationTest.java index 77f816757b61..05924435a9f8 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/ExportControllerPaginationTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/ExportControllerPaginationTest.java @@ -38,6 +38,7 @@ import org.hisp.dhis.category.CategoryService; import org.hisp.dhis.common.CodeGenerator; import org.hisp.dhis.common.IdentifiableObjectManager; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Enrollment; @@ -50,7 +51,6 @@ import org.hisp.dhis.relationship.RelationshipItem; import org.hisp.dhis.relationship.RelationshipType; import org.hisp.dhis.security.acl.AccessStringHelper; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.trackedentity.TrackedEntity; import org.hisp.dhis.trackedentity.TrackedEntityType; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/enrollment/EnrollmentsExportControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/enrollment/EnrollmentsExportControllerTest.java index 6a25fdcce3f9..75299997d412 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/enrollment/EnrollmentsExportControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/enrollment/EnrollmentsExportControllerTest.java @@ -45,6 +45,7 @@ import org.hisp.dhis.common.ValueType; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.eventdatavalue.EventDataValue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.note.Note; import org.hisp.dhis.organisationunit.OrganisationUnit; @@ -58,7 +59,6 @@ import org.hisp.dhis.relationship.RelationshipItem; import org.hisp.dhis.relationship.RelationshipType; import org.hisp.dhis.security.acl.AccessStringHelper; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.trackedentity.TrackedEntity; import org.hisp.dhis.trackedentity.TrackedEntityAttribute; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventsExportControllerByIdTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventsExportControllerByIdTest.java index 875bc885e2b3..82528b80c1dc 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventsExportControllerByIdTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventsExportControllerByIdTest.java @@ -27,9 +27,9 @@ */ package org.hisp.dhis.webapi.controller.tracker.export.event; +import static org.hisp.dhis.http.HttpClientAdapter.Header; import static org.hisp.dhis.test.utils.Assertions.assertContains; import static org.hisp.dhis.test.utils.Assertions.assertStartsWith; -import static org.hisp.dhis.test.web.WebClient.Header; import static org.hisp.dhis.webapi.controller.tracker.JsonAssertions.assertHasMember; import static org.hisp.dhis.webapi.controller.tracker.JsonAssertions.assertHasNoMember; import static org.hisp.dhis.webapi.controller.tracker.JsonAssertions.assertHasOnlyMembers; @@ -59,6 +59,7 @@ import org.hisp.dhis.fileresource.FileResourceService; import org.hisp.dhis.fileresource.FileResourceStorageStatus; import org.hisp.dhis.fileresource.ImageFileDimension; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.note.Note; @@ -75,7 +76,6 @@ import org.hisp.dhis.relationship.RelationshipItem; import org.hisp.dhis.relationship.RelationshipType; import org.hisp.dhis.security.acl.AccessStringHelper; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.trackedentity.TrackedEntity; import org.hisp.dhis.trackedentity.TrackedEntityType; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventsExportControllerPostgresTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventsExportControllerPostgresTest.java index 4c8372d49543..1d4e71c35f27 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventsExportControllerPostgresTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventsExportControllerPostgresTest.java @@ -44,6 +44,7 @@ import org.hisp.dhis.common.ValueType; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.eventdatavalue.EventDataValue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Enrollment; @@ -53,7 +54,6 @@ import org.hisp.dhis.program.ProgramStage; import org.hisp.dhis.program.ProgramStageDataElement; import org.hisp.dhis.security.acl.AccessStringHelper; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.hisp.dhis.trackedentity.TrackedEntity; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventsExportControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventsExportControllerTest.java index f6dc581629b4..13a36222e76f 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventsExportControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventsExportControllerTest.java @@ -45,11 +45,11 @@ import org.hisp.dhis.feedback.BadRequestException; import org.hisp.dhis.feedback.ForbiddenException; import org.hisp.dhis.feedback.NotFoundException; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramStage; import org.hisp.dhis.security.acl.AccessStringHelper; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.tracker.export.event.EventService; import org.hisp.dhis.user.User; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/relationship/RelationshipsExportControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/relationship/RelationshipsExportControllerTest.java index 7d90d5c2dc9e..c51df129614b 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/relationship/RelationshipsExportControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/relationship/RelationshipsExportControllerTest.java @@ -49,6 +49,7 @@ import org.hisp.dhis.common.IdentifiableObjectManager; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.eventdatavalue.EventDataValue; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.note.Note; @@ -64,7 +65,6 @@ import org.hisp.dhis.relationship.RelationshipItem; import org.hisp.dhis.relationship.RelationshipType; import org.hisp.dhis.security.acl.AccessStringHelper; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.trackedentity.TrackedEntity; import org.hisp.dhis.trackedentity.TrackedEntityAttribute; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/trackedentity/TrackedEntitiesExportControllerPostgresTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/trackedentity/TrackedEntitiesExportControllerPostgresTest.java index 3f2b89ad1a9c..86c15704dd33 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/trackedentity/TrackedEntitiesExportControllerPostgresTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/trackedentity/TrackedEntitiesExportControllerPostgresTest.java @@ -47,11 +47,11 @@ import org.hisp.dhis.dxf2.metadata.objectbundle.ObjectBundleService; import org.hisp.dhis.dxf2.metadata.objectbundle.ObjectBundleValidationService; import org.hisp.dhis.dxf2.metadata.objectbundle.feedback.ObjectBundleValidationReport; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.importexport.ImportStrategy; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.render.RenderFormat; import org.hisp.dhis.render.RenderService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.hisp.dhis.trackedentity.TrackedEntity; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/trackedentity/TrackedEntitiesExportControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/trackedentity/TrackedEntitiesExportControllerTest.java index 0177462255e2..078ad8c972d4 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/trackedentity/TrackedEntitiesExportControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/trackedentity/TrackedEntitiesExportControllerTest.java @@ -28,8 +28,8 @@ package org.hisp.dhis.webapi.controller.tracker.export.trackedentity; import static org.hisp.dhis.common.OrganisationUnitSelectionMode.ACCESSIBLE; +import static org.hisp.dhis.http.HttpClientAdapter.Accept; import static org.hisp.dhis.test.utils.Assertions.assertStartsWith; -import static org.hisp.dhis.test.web.WebClient.Accept; import static org.hisp.dhis.webapi.controller.tracker.JsonAssertions.assertContainsAll; import static org.hisp.dhis.webapi.controller.tracker.JsonAssertions.assertFirstRelationship; import static org.hisp.dhis.webapi.controller.tracker.JsonAssertions.assertHasMember; @@ -55,6 +55,7 @@ import org.hisp.dhis.fileresource.FileResource; import org.hisp.dhis.fileresource.FileResourceService; import org.hisp.dhis.fileresource.FileResourceStorageStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Enrollment; @@ -67,7 +68,6 @@ import org.hisp.dhis.relationship.RelationshipItem; import org.hisp.dhis.relationship.RelationshipType; import org.hisp.dhis.security.acl.AccessStringHelper; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.trackedentity.TrackedEntity; import org.hisp.dhis.trackedentity.TrackedEntityAttribute; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerCreateRelationshipSMSTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerCreateRelationshipSMSTest.java index cbdd6cab4a73..4c117aeacb2a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerCreateRelationshipSMSTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerCreateRelationshipSMSTest.java @@ -44,6 +44,7 @@ import org.hisp.dhis.common.IdentifiableObjectManager; import org.hisp.dhis.common.ValueType; import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.message.MessageSender; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Enrollment; @@ -63,7 +64,6 @@ import org.hisp.dhis.smscompression.SmsCompressionException; import org.hisp.dhis.smscompression.SmsResponse; import org.hisp.dhis.smscompression.models.RelationshipSmsSubmission; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.hisp.dhis.trackedentity.TrackedEntity; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerEnrollmentSMSTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerEnrollmentSMSTest.java index d23621038b1f..91e5218b4069 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerEnrollmentSMSTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerEnrollmentSMSTest.java @@ -53,6 +53,7 @@ import org.hisp.dhis.feedback.BadRequestException; import org.hisp.dhis.feedback.ForbiddenException; import org.hisp.dhis.feedback.NotFoundException; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.organisationunit.FeatureType; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Enrollment; @@ -75,7 +76,6 @@ import org.hisp.dhis.smscompression.models.EnrollmentSmsSubmission; import org.hisp.dhis.smscompression.models.SmsAttributeValue; import org.hisp.dhis.test.message.DefaultFakeMessageSender; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.hisp.dhis.trackedentity.TrackedEntity; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerEventSMSTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerEventSMSTest.java index 6b65c036ebe2..5ddeb74dda99 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerEventSMSTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerEventSMSTest.java @@ -63,6 +63,7 @@ import org.hisp.dhis.feedback.BadRequestException; import org.hisp.dhis.feedback.ForbiddenException; import org.hisp.dhis.feedback.NotFoundException; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.organisationunit.FeatureType; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Enrollment; @@ -89,7 +90,6 @@ import org.hisp.dhis.smscompression.models.SmsDataValue; import org.hisp.dhis.smscompression.models.TrackerEventSmsSubmission; import org.hisp.dhis.test.message.DefaultFakeMessageSender; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.hisp.dhis.trackedentity.TrackedEntity; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerImportControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerImportControllerTest.java index 5a1a61e12a99..f14bb9884e6a 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerImportControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerImportControllerTest.java @@ -29,7 +29,7 @@ import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.junit.jupiter.api.Test; import org.springframework.transaction.annotation.Transactional; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerImportReportTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerImportReportTest.java index 9a9f530f8c7f..091a1f0562f1 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerImportReportTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/imports/TrackerImportReportTest.java @@ -36,11 +36,11 @@ import java.nio.file.Path; import java.util.List; import java.util.Set; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramStage; import org.hisp.dhis.relationship.RelationshipType; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.trackedentity.TrackedEntityType; import org.hisp.dhis.tracker.imports.report.ImportReport; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/ownership/TrackerOwnershipControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/ownership/TrackerOwnershipControllerTest.java index 85aeaf56657a..ad99714e7c4b 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/ownership/TrackerOwnershipControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/ownership/TrackerOwnershipControllerTest.java @@ -27,14 +27,14 @@ */ package org.hisp.dhis.webapi.controller.tracker.ownership; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.Set; import org.hisp.dhis.common.CodeGenerator; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.organisationunit.OrganisationUnit; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.PostgresControllerIntegrationTestBase; import org.hisp.dhis.user.User; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreControllerTest.java index 5038da04bc79..726aaf0c82a1 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreControllerTest.java @@ -27,11 +27,11 @@ */ package org.hisp.dhis.webapi.controller.userdatastore; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.hisp.dhis.webapi.controller.UserDatastoreController; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreFieldsControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreFieldsControllerTest.java index 58ffe04ea318..764740a34052 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreFieldsControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreFieldsControllerTest.java @@ -34,7 +34,7 @@ import jakarta.servlet.http.HttpServletResponse; import java.util.List; import org.hisp.dhis.datastore.DatastoreParams; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.webapi.controller.AbstractUserDatastoreControllerTest; import org.hisp.dhis.webapi.controller.UserDatastoreController; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreFilterControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreFilterControllerTest.java index 8c2e9e0ee1f7..626550f86c75 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreFilterControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreFilterControllerTest.java @@ -34,7 +34,7 @@ import jakarta.servlet.http.HttpServletResponse; import java.util.List; import org.hisp.dhis.datastore.DatastoreParams; -import org.hisp.dhis.test.web.HttpStatus; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.webapi.controller.AbstractUserDatastoreControllerTest; import org.hisp.dhis.webapi.controller.UserDatastoreController; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreSuperuserControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreSuperuserControllerTest.java index 905ce3296a63..5afdf288bccb 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreSuperuserControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/userdatastore/UserDatastoreSuperuserControllerTest.java @@ -27,15 +27,15 @@ */ package org.hisp.dhis.webapi.controller.userdatastore; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; import static org.hisp.dhis.test.utils.Assertions.assertContainsOnly; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; import static org.hisp.dhis.test.webapi.Assertions.assertWebMessage; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.List; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonBoolean; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonWebMessage; import org.hisp.dhis.user.User; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/security/ApiTokenAuthenticationTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/security/ApiTokenAuthenticationTest.java index c7909fb56e34..70a6534848b3 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/security/ApiTokenAuthenticationTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/security/ApiTokenAuthenticationTest.java @@ -27,17 +27,17 @@ */ package org.hisp.dhis.webapi.security; +import static org.hisp.dhis.http.HttpClientAdapter.ApiTokenHeader; +import static org.hisp.dhis.http.HttpClientAdapter.Header; import static org.hisp.dhis.security.apikey.ApiKeyTokenGenerator.generatePersonalAccessToken; -import static org.hisp.dhis.test.web.WebClient.ApiTokenHeader; -import static org.hisp.dhis.test.web.WebClient.Header; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.concurrent.TimeUnit; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.security.apikey.ApiKeyTokenGenerator; import org.hisp.dhis.security.apikey.ApiKeyTokenGenerator.TokenWrapper; import org.hisp.dhis.security.apikey.ApiToken; import org.hisp.dhis.security.apikey.ApiTokenService; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.ControllerWithApiTokenAuthTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonUser; import org.hisp.dhis.user.CurrentUserUtil; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/security/ApiTokenControllerTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/security/ApiTokenControllerTest.java index 720cc5a35c4d..332f7eb3baf5 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/security/ApiTokenControllerTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/security/ApiTokenControllerTest.java @@ -27,20 +27,20 @@ */ package org.hisp.dhis.webapi.security; -import static org.hisp.dhis.test.web.WebClient.Body; -import static org.hisp.dhis.test.web.WebClientUtils.assertStatus; +import static org.hisp.dhis.http.HttpAssertions.assertStatus; +import static org.hisp.dhis.http.HttpClientAdapter.Body; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; +import org.hisp.dhis.http.HttpAssertions; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.jsontree.JsonList; import org.hisp.dhis.jsontree.JsonObject; import org.hisp.dhis.render.RenderService; import org.hisp.dhis.security.apikey.ApiToken; import org.hisp.dhis.security.apikey.ApiTokenService; -import org.hisp.dhis.test.web.HttpStatus; -import org.hisp.dhis.test.web.WebClientUtils; import org.hisp.dhis.test.webapi.H2ControllerIntegrationTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonApiToken; import org.hisp.dhis.user.User; @@ -268,7 +268,7 @@ public static JsonObject assertApiTokenCreatedResponse(HttpResponse okResponse) if (HttpStatus.CREATED != actualStatus) { assertEquals(HttpStatus.CREATED, actualStatus, "Actual response is not CREATED"); } - WebClientUtils.assertValidLocation(okResponse); + HttpAssertions.assertValidLocation(okResponse); JsonObject report = okResponse.contentUnchecked().getObject("response"); if (report.exists()) { return report; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/security/JwtBearerTokenTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/security/JwtBearerTokenTest.java index b202e5bef552..38bed50ddb1c 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/security/JwtBearerTokenTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/security/JwtBearerTokenTest.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.webapi.security; -import static org.hisp.dhis.test.web.WebClient.JwtTokenHeader; +import static org.hisp.dhis.http.HttpClientAdapter.JwtTokenHeader; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -39,12 +39,12 @@ import java.util.List; import java.util.Properties; import org.hisp.dhis.external.conf.ConfigurationKey; +import org.hisp.dhis.http.HttpStatus; import org.hisp.dhis.security.jwt.Dhis2JwtAuthenticationManagerResolver; import org.hisp.dhis.security.oidc.DhisOidcClientRegistration; import org.hisp.dhis.security.oidc.DhisOidcProviderRepository; import org.hisp.dhis.security.oidc.GenericOidcProviderConfigParser; import org.hisp.dhis.security.oidc.provider.GoogleProvider; -import org.hisp.dhis.test.web.HttpStatus; import org.hisp.dhis.test.webapi.ControllerWithJwtTokenAuthTestBase; import org.hisp.dhis.test.webapi.json.domain.JsonError; import org.hisp.dhis.test.webapi.json.domain.JsonUser;