Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
salvatore-coppola committed Oct 17, 2023
1 parent f97c71b commit e882518
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.eclipse.kura.core.testutil.requesthandler.Transport.MethodSpec;
import org.eclipse.kura.internal.rest.identity.provider.IdentityRestService;
import org.eclipse.kura.internal.rest.identity.provider.IdentityService;
import org.eclipse.kura.internal.rest.identity.provider.dto.UserConfigDTO;
import org.eclipse.kura.internal.rest.identity.provider.dto.UserDTO;
import org.eclipse.kura.util.wire.test.WireTestUtil;
import org.junit.AfterClass;
Expand All @@ -59,7 +58,7 @@ public class IdentityEndpointsTest extends AbstractRequestHandlerTest {
private static final String METHOD_SPEC_POST = "POST";
private static final String METHOD_SPEC_DELETE = "DELETE";
private static final String MQTT_METHOD_SPEC_DEL = "DEL";
private static final String METHOD_SPEC_UPDATE = "UPDATE";
private static final String METHOD_SPEC_PUT = "PUT";
private static final String REST_APP_ID = "identity/v1";

private static IdentityService identityServiceMock = mock(IdentityService.class);
Expand All @@ -76,8 +75,6 @@ public class IdentityEndpointsTest extends AbstractRequestHandlerTest {
IdentityEndpointsTest.class.getResourceAsStream("/getUserResponse.json"), "UTF-8").useDelimiter("\\A")
.next().replace(" ", "");

private UserConfigDTO userConfigRequest;

private static Set<UserDTO> userConfigs;

private static ServiceRegistration<IdentityService> identityServiceRegistration;
Expand Down Expand Up @@ -109,7 +106,7 @@ public void shouldInvokeUpdateUserSuccessfully() throws KuraException {

givenIdentityService();

whenRequestIsPerformed(new MethodSpec(METHOD_SPEC_UPDATE), "/identities", gson.toJson(user));
whenRequestIsPerformed(new MethodSpec(METHOD_SPEC_PUT), "/identities", gson.toJson(user));

thenRequestSucceeds();
thenResponseBodyIsEmpty();
Expand Down

0 comments on commit e882518

Please sign in to comment.