public VOUser GetUser() { Utility.CheckAuthentication(() => DAL.GetUser(user.Token), (res) => { var keyValue = JsonConvert.DeserializeObject <VOUser>(res.Content.ReadAsStringAsync().Result); user.Status = keyValue.Status; user.Role = keyValue.Role; user.Id = keyValue.Id; }, this); return(user); }
public void TestCase() { Assert.Inconclusive(); try { var result = dal.GetUser("token"); Assert.IsNotNull(result); } catch (Exception ex) { if (ex.InnerException.GetType() == typeof(WebException) && ((WebException)ex.InnerException).Status.ToString() == "ConnectFailure") { Assert.Fail(); } } }