示例#1
0
        public async Task Test500Message()
        {
            DataCenter   fakeDC = new DataCenter("https://thisisnotarealurlatall-akmeaoiaefoij.com/");
            SovrenClient client = new SovrenClient("1234", "1234", fakeDC);

            try
            {
                await client.GetAccountInfo();
            }
            catch (SovrenException e)
            {
                Assert.AreEqual(HttpStatusCode.InternalServerError, e.HttpStatusCode);
                //the message for a 500 connection failed varies based on environment so do not check that
            }
        }
示例#2
0
        public async Task Test404Message()
        {
            DataCenter   fakeDC = new DataCenter("https://rest.resumeparsing.com/v9/fake");
            SovrenClient client = new SovrenClient("1234", "1234", fakeDC);

            try
            {
                await client.GetAccountInfo();
            }
            catch (SovrenException e)
            {
                Assert.AreEqual(HttpStatusCode.NotFound, e.HttpStatusCode);
                Assert.AreEqual("404 - Not Found", e.Message);
            }
        }