Esempio n. 1
0
        public void basicTest()
        {
            NimbiClient      client           = new NimbiClient(Environments.QA, "[some_api_id]", "[some_api_key]");
            ConnectivityTest connectivityTest = new ConnectivityTest();
            IRestResponse    response         = connectivityTest.testConnectivity(client);

            Assert.IsTrue($"{{\"Errors\":[\"Invalid API Key. ([some_api_key])\"],\"StatusCode\":400}}".Equals(response.Content));
        }
Esempio n. 2
0
        public IRestResponse testConnectivity(NimbiClient nimbi)
        {
            var client  = new RestClient(nimbi.environment.Value + "/API/rest/ConnectivityTest/v1/TestConnectivity");
            var request = new RestRequest(Method.GET);

            request.AddHeader(NimbiClient.API_ID, nimbi.apiId);
            request.AddHeader(NimbiClient.API_KEY, nimbi.apiKey);
            IRestResponse response = client.Execute(request);

            return(response);
        }