Created
November 12, 2011 11:39
-
-
Save hstaudacher/1360418 to your computer and use it in GitHub Desktop.
A simple Polling Test using restfuse
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
@RunWith( HttpJUnitRunner.class ) | |
public class RestfusePollTest { | |
@Rule | |
public Destination destination = new Destination( "http://restfuse.com" ); | |
@Context | |
private Response response; | |
@Context | |
private PollState pollState | |
@HttpTest( method = Method.GET, path = "/asynchron" ) | |
@Poll( times = 5, interval = 500 ) | |
public void testAsynchronousService() { | |
Response currentResponse = pollState.getRespone( pollState.getTimes() ); | |
assertEquals( currentResponse, response ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment