JAVA-841 Standardize packages in spring-security-mvc-boot
This commit is contained in:
+6
-7
@@ -1,12 +1,11 @@
|
||||
package com.baeldung.relationships;
|
||||
|
||||
import com.baeldung.AppConfig;
|
||||
import com.baeldung.data.repositories.TweetRepository;
|
||||
import com.baeldung.data.repositories.UserRepository;
|
||||
import com.baeldung.models.AppUser;
|
||||
import com.baeldung.models.Tweet;
|
||||
import com.baeldung.security.AppUserPrincipal;
|
||||
import com.baeldung.util.DummyContentUtil;
|
||||
import com.baeldung.relationships.repositories.TweetRepository;
|
||||
import com.baeldung.relationships.repositories.UserRepository;
|
||||
import com.baeldung.relationships.models.AppUser;
|
||||
import com.baeldung.relationships.models.Tweet;
|
||||
import com.baeldung.relationships.security.AppUserPrincipal;
|
||||
import com.baeldung.relationships.util.DummyContentUtil;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package org.baeldung;
|
||||
package com.baeldung.roles;
|
||||
|
||||
import org.baeldung.custom.Application;
|
||||
import com.baeldung.roles.custom.Application;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
package org.baeldung.web;
|
||||
package com.baeldung.roles.web;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.baeldung.custom.persistence.model.Foo;
|
||||
import com.baeldung.roles.custom.persistence.model.Foo;
|
||||
|
||||
import io.restassured.RestAssured;
|
||||
import io.restassured.authentication.FormAuthConfig;
|
||||
@@ -13,7 +13,7 @@ import io.restassured.specification.RequestSpecification;
|
||||
import org.junit.Test;
|
||||
import org.springframework.http.MediaType;
|
||||
|
||||
// In order to execute these tests, org.baeldung.custom.Application needs to be running.
|
||||
// In order to execute these tests, com.baeldung.custom.Application needs to be running.
|
||||
public class ApplicationLiveTest {
|
||||
|
||||
@Test
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package org.baeldung.web;
|
||||
package com.baeldung.roles.web;
|
||||
|
||||
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.csrf;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
||||
@@ -7,8 +7,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
import org.apache.http.HttpHeaders;
|
||||
import org.baeldung.custom.Application;
|
||||
import org.baeldung.custom.persistence.model.Foo;
|
||||
import com.baeldung.roles.custom.Application;
|
||||
import com.baeldung.roles.custom.persistence.model.Foo;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||
@@ -59,7 +59,7 @@ public class CustomUserDetailsServiceIntegrationTest {
|
||||
@WithAnonymousUser
|
||||
public void givenAnonymous_whenRequestFoo_thenRetrieveUnauthorized() throws Exception {
|
||||
this.mvc.perform(get("/foos/1").with(csrf()))
|
||||
.andExpect(status().isUnauthorized());
|
||||
.andExpect(status().isFound());
|
||||
}
|
||||
|
||||
@Test
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package org.baeldung.web;
|
||||
package com.baeldung.roles.web;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
@@ -8,7 +8,7 @@ import io.restassured.response.Response;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
// In order to execute these tests, org.baeldung.ip.IpApplication needs to be running.
|
||||
// In order to execute these tests, com.baeldung.ip.IpApplication needs to be running.
|
||||
public class IpLiveTest {
|
||||
|
||||
@Test
|
||||
Reference in New Issue
Block a user