コード例 #1
0
        public void getStringTest()
        {
            var customString = new CustomString();

            customString.setString("test");
            Assert.AreEqual(customString.getString(), "test");
        }
コード例 #2
0
        public void setStringTest()
        {
            var customString = new CustomString();

            customString.setString("test");
            string test = customString.getString();

            Assert.AreEqual(test, "test");
        }
コード例 #3
0
        public void googlePingTest()
        {
            var customString = new CustomString();

            customString.setString("hatbtapb:a/b/awbwawb.agboaobgalbea.bcaobma");
            //HttpClient client = new HttpClient(); //Opens client
            Console.WriteLine(customString.getString());
            HttpWebRequest client = (HttpWebRequest)WebRequest.Create(customString.removeEveryNthCharacter(2, false));


            //var result = client.GetAsync(customString.getString());
            HttpWebResponse result = (HttpWebResponse)client.GetResponse();

            Assert.AreEqual(result.StatusCode, HttpStatusCode.OK);
        }