> @@ -410,7 +410,7 @@ public void testGetUserWithHostname() {
>
> HttpResponse.builder().statusCode(200).payload(payloadFromResource("/user_get_withhost.json")).build()
> ).getUserApiForInstanceInZone("instanceId-1234-5678","RegionOne");
>
> - User user = api.get("exampleuser", "192.168.64.64");
> + User user = api.get("example.user", "192.168.64.64");
> assertEquals(user.getName(), "exampleuser");
I think having expect tests behave like the real API, even if they are just a
mock with dummy data, is usually a good idea. Along with live tests, expect
ones are good examples of how to use an API, and this one caused me confusion
(that's why I asked :)).
Personally, I think it would be good to change the json file even if that means
changing assertions in other tests (change is quite trivial), but given that
the test already tests the functionality it is okay to me as is. I was just
curious :)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/14/files#r5078774