-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When fully-qualified links are enabled AND a path is specified for th…
…e StoreRestResource SDR should return content
- Loading branch information
1 parent
2a35cb3
commit 3a65a85
Showing
9 changed files
with
225 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
...est/java/internal/org/springframework/content/rest/controllers/FullyQualifiedLinksIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package internal.org.springframework.content.rest.controllers; | ||
|
||
import com.github.paulcwarren.ginkgo4j.Ginkgo4jSpringRunner; | ||
import internal.org.springframework.content.rest.support.*; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.content.rest.config.RestConfiguration; | ||
import org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration; | ||
import org.springframework.test.context.ContextConfiguration; | ||
import org.springframework.test.context.web.WebAppConfiguration; | ||
import org.springframework.test.web.servlet.MockMvc; | ||
import org.springframework.test.web.servlet.setup.MockMvcBuilders; | ||
import org.springframework.transaction.annotation.Transactional; | ||
import org.springframework.web.context.WebApplicationContext; | ||
import org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration; | ||
|
||
import static com.github.paulcwarren.ginkgo4j.Ginkgo4jDSL.*; | ||
|
||
@RunWith(Ginkgo4jSpringRunner.class) | ||
//@Ginkgo4jConfiguration(threads=1) | ||
@WebAppConfiguration | ||
@ContextConfiguration(classes = { | ||
FullyQualifiedLinksConfig.class, | ||
DelegatingWebMvcConfiguration.class, | ||
RepositoryRestMvcConfiguration.class, | ||
RestConfiguration.class }) | ||
@Transactional | ||
public class FullyQualifiedLinksIT { | ||
|
||
@Autowired | ||
private TestEntityRepository repo3; | ||
|
||
@Autowired | ||
private TestEntityContentRepository store3; | ||
|
||
@Autowired | ||
private WebApplicationContext context; | ||
|
||
private MockMvc mvc; | ||
|
||
private TestEntity testEntity3; | ||
|
||
private Content contentTests; | ||
|
||
{ | ||
Describe("ContextPath Content Tests", () -> { | ||
BeforeEach(() -> { | ||
mvc = MockMvcBuilders.webAppContextSetup(context).build(); | ||
}); | ||
Context("given an entity is the subject of a repository and storage", () -> { | ||
BeforeEach(() -> { | ||
testEntity3 = repo3.save(new TestEntity()); | ||
testEntity3 = repo3.save(testEntity3); | ||
|
||
contentTests.setMvc(mvc); | ||
contentTests.setUrl("/testEntitiesContent/" + testEntity3.getId() + "/content"); | ||
contentTests.setEntity(testEntity3); | ||
contentTests.setRepository(repo3); | ||
contentTests.setStore(store3); | ||
|
||
}); | ||
contentTests = Content.tests(); | ||
}); | ||
}); | ||
} | ||
|
||
@Test | ||
public void noop() {} | ||
} |
Oops, something went wrong.