public void CanSendGetRequest()
        {
            query.CreateGeneralInfoQuery();
            networkRequest = new NetworkRequest(query.GetUri());
            string response = networkRequest.SendGetRequest();

            Assert.AreEqual(response.Length > 0, true);
        }
Ejemplo n.º 2
0
        public void CanDeserialiseGeneralInfoResponse()
        {
            query.CreateGeneralInfoQuery();
            networkRequest = new NetworkRequest(query.GetUri());
            string             response    = networkRequest.SendGetRequest();
            APINetworkResponse apiResponse = result.RetrieveResultsOfNetworkResponse(response);
            bool legitResponse             = apiResponse.Success == true && apiResponse.Data.Any();

            Assert.AreEqual(legitResponse, true);
        }
        private bool ConstructRequestWithPathAndReturnStatus(string path)
        {
            query.SetPath(path);
            query.ConstructUriWithPathOnly();
            Uri generatedUri = query.GetUri();

            networkRequest = new NetworkRequest(query.GetUri());
            networkRequest.SendGetRequest();
            return(networkRequest.GetResponseStatusCode());
        }