public void CanUseClientForDifferentCalls() { var client = new FluentClient<Error>("http://local.property.erm-api.com/v1/"); Room room1 = client.Get<Room>("H151006172656205").Result.Entity; Room room2 = client.Get<Room>("H151006172656205").Result.Entity; Assert.IsNotNull(room1); Assert.IsNotNull(room2); }
public void CanUseClientForDifferentCalls() { var client = new FluentClient <Error>("http://local.property.erm-api.com/v1/"); Room room1 = client.Get <Room>("H151006172656205").Result.Entity; Room room2 = client.Get <Room>("H151006172656205").Result.Entity; Assert.IsNotNull(room1); Assert.IsNotNull(room2); }
public void HandlesNetworkFailure() { var client = new FluentClient<Error>("http://local.property.erm-api.com/v1/"); // server set up to fail on this code FluentResponse<User, Error> room = client.Get<User>("forceerror").Result; Assert.IsNotNull(room); Assert.IsNull(room.Entity); Assert.AreEqual(401, (int)room.StatusCode); Assert.AreEqual("Authenticate", room.Error.Message); }
public void HandlesNetworkFailure() { var client = new FluentClient <Error>("http://local.property.erm-api.com/v1/"); // server set up to fail on this code FluentResponse <User, Error> room = client.Get <User>("forceerror").Result; Assert.IsNotNull(room); Assert.IsNull(room.Entity); Assert.AreEqual(401, (int)room.StatusCode); Assert.AreEqual("Authenticate", room.Error.Message); }