Пример #1
0
        public void GitHubQuery_PingAssert_Test()
        {
            //Arrange
            bool result = false;

            //Act
            result = GitHubApiQuery.CheckByPing("127.0.0.1", -1);

            //Assert
            Assert.IsFalse(result);
        }
Пример #2
0
        public void GitHubQuery_PingHostName_Test()
        {
            //Arrange
            bool result = false;

            //Act
            result = GitHubApiQuery.CheckByPing("www.google.com");

            //Assert
            Assert.IsTrue(result);
        }
Пример #3
0
        public void GitHubQuery_PingWEB_Test()
        {
            //Arrange
            bool result = false;

            //Act
            result = GitHubApiQuery.CheckByPing("8.8.8.8", 2000);

            //Assert
            Assert.IsTrue(result);
        }
Пример #4
0
        public void GitHubQuery_PingNoHost_Test()
        {
            //Arrange
            bool result = false;

            //Act
            result = GitHubApiQuery.CheckByPing("");

            //Assert
            Assert.IsFalse(result);
        }
Пример #5
0
        public void GitHubQuery_PingLocal_Test()
        {
            //Arrange
            bool result = false;

            //Act
            result = GitHubApiQuery.CheckByPing("127.0.0.1", 2000);

            //Assert
            Assert.IsTrue(result);
        }