Skip to content

Commit

Permalink
enable viewshandler tests which now work
Browse files Browse the repository at this point in the history
  • Loading branch information
DenverCoder544 committed Jan 17, 2025
1 parent 793d08c commit fea5048
Showing 1 changed file with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
import fi.nls.oskari.control.ActionException;
import fi.nls.oskari.control.ActionParameters;
import fi.nls.oskari.domain.map.view.View;
import fi.nls.oskari.map.view.*;
import fi.nls.oskari.map.view.BundleService;
import fi.nls.oskari.map.view.BundleServiceMemory;
import fi.nls.oskari.map.view.ViewException;
import fi.nls.oskari.map.view.ViewService;
import fi.nls.oskari.map.view.ViewServiceMemory;
import fi.nls.oskari.map.view.util.ViewHelper;
import fi.nls.test.control.JSONActionRouteTest;
import org.json.JSONException;
import org.json.JSONObject;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.io.ByteArrayInputStream;
Expand Down Expand Up @@ -66,8 +69,6 @@ public void whenUserIsNotAdminThrowsActionException() {
}

@Test
@Disabled
// org.opentest4j.AssertionFailedError: ActionException should have been thrown
public void whenUuidIsMissingThrowsActionException() {
ActionParameters params = new ActionParameters();
params.setRequest(mockHttpServletRequest());
Expand All @@ -83,8 +84,6 @@ public void whenUuidIsMissingThrowsActionException() {
}

@Test
@Disabled
// org.opentest4j.AssertionFailedError: ActionException should have been thrown
public void whenGETtingViewThatDoesNotExistThrowsActionException() {
Map<String, String> queryParams = new HashMap<>();
queryParams.put("uuid", "my-unknown-fake-uuid");
Expand All @@ -103,8 +102,6 @@ public void whenGETtingViewThatDoesNotExistThrowsActionException() {
}

@Test
@Disabled
// org.opentest4j.AssertionFailedError: ActionException should have been thrown
public void whenGETtingViewThatDoesExistRespondsWithValidJSON()
throws ActionException, IllegalArgumentException, JSONException, ViewException {
// Add View to ViewService
Expand Down Expand Up @@ -148,8 +145,6 @@ public void whenGETtingViewThatDoesExistRespondsWithValidJSON()
}

@Test
@Disabled
// org.opentest4j.AssertionFailedError: ActionException should have been thrown
public void whenPOSTingValidJSONRespondsWithJSONContainingTheIdAndUuid()
throws JSONException, ActionException {
View view = getDummyView();
Expand Down

0 comments on commit fea5048

Please sign in to comment.