Created
September 19, 2012 14:03
-
-
Save numa08/3749857 to your computer and use it in GitHub Desktop.
AsyncAccessTest
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
[TestClass] | |
public class AsyncAccessTest : SilverlightTest | |
{ | |
[TestMethod, Asynchronous] | |
public void Test_AsyncHTTPGET_Success() | |
{ | |
var accesser = new AsyncAccess(); | |
accesser | |
.requestHttpGET("http://www.google.co.jp"). | |
ObserveOnTest(this). | |
Subscribe(content => | |
{ | |
Assert.IsNotNull(content); | |
TestComplete(); | |
}); | |
} | |
[TestMethod, Asynchronous] | |
public void Test_AsyncHTTPGET_InvalidURL() | |
{ | |
var accesser = new AsyncAccess(); | |
accesser | |
.requestHttpGET("http://localhost"). | |
ObserveOnTest(this) | |
.Subscribe | |
(_ => Assert.Fail(), | |
e => | |
{ | |
Assert.IsNotNull(e); | |
TestComplete(); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment