示例#1
0
 public void Ping_WithInvalidCredentials()
 {
     //Arrange
     Credentials c = new Credentials(
         appName: "wuffSonic",
         user: "******",
         password: "******",
         version: "1.11",
         uri: "http://music.haus.foxburu.mx"
         );
     Ping p = new Ping()
     {
         Credentials = c
     };
     //Act
     p.DoRequest<PingResponse>().GetAwaiter().GetResult();
 }
示例#2
0
 public void Ping_WithValidCredentials()
 {
     //Arrange
     Ping p = new Ping()
     {
         Credentials = c
     };
     string expectedStatus = "ok";
     //Act
     var response = p.DoRequest<PingResponse>().Result;
     //Assert
     Assert.AreEqual<string>(expectedStatus, response.status);
 }
示例#3
0
        public void Ping_NoCredentials()
        {
            //Arrange
            Ping p = new Ping();

            //Act
            p.DoRequest<PingResponse>().GetAwaiter().GetResult();
        }