-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
807363c
commit 04045f7
Showing
3 changed files
with
45 additions
and
13 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...WebServices/src/test/java/org/robbins/flashcards/webservices/FlashCardsAppResourceIT.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,30 @@ | ||
|
||
package org.robbins.flashcards.webservices; | ||
|
||
import static org.hamcrest.CoreMatchers.is; | ||
import static org.hamcrest.Matchers.greaterThan; | ||
import static org.junit.Assert.assertThat; | ||
|
||
import org.junit.Test; | ||
import org.junit.experimental.categories.Category; | ||
import org.robbins.flashcards.tests.webservices.BaseRestTest; | ||
import org.robbins.flashcards.webservices.util.ResourceUrls; | ||
import org.robbins.tests.IntegrationTest; | ||
import org.springframework.test.context.ContextConfiguration; | ||
|
||
@Category(IntegrationTest.class) | ||
@ContextConfiguration(locations = { "classpath*:applicatonContext-webServices-test.xml" }) | ||
public class FlashCardsAppResourceIT extends BaseRestTest { | ||
|
||
private String getStatusUrl() { | ||
return getServerAddress() + ResourceUrls.status; | ||
} | ||
|
||
@Test | ||
public void status_FoundManifestAndVerson() { | ||
String result = getRestTemplate().getForObject(getStatusUrl(), String.class); | ||
|
||
assertThat(result, is(String.class)); | ||
assertThat(result.length(), greaterThan(1)); | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
FlashCards_WebServices/src/test/resources/application.properties
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
server.address=http://localhost:8080/api/v1/ | ||
server.address=http://localhost:8080/api/ | ||
server.loginname=apiuser | ||
server.password=apiuserpassword |