fixed unit test

git-svn-id: http://jclouds.googlecode.com/svn/trunk@2237 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-11-09 04:13:33 +00:00
parent 78d72fae49
commit cfe06effb7
1 changed files with 14 additions and 14 deletions

View File

@ -210,8 +210,8 @@ public class CloudServersClientTest {
new Object[] { changesSince(now).maxResults(1).startAt(2) }); new Object[] { changesSince(now).maxResults(1).startAt(2) });
assertEquals(httpMethod.getEndpoint().getHost(), "localhost"); assertEquals(httpMethod.getEndpoint().getHost(), "localhost");
assertEquals(httpMethod.getEndpoint().getPath(), "/servers"); assertEquals(httpMethod.getEndpoint().getPath(), "/servers");
assertEquals(httpMethod.getEndpoint().getQuery(), "format=json" + "&limit=1&changes-since=" assertEquals(httpMethod.getEndpoint().getQuery(), "format=json&changes-since="
+ now.getMillis() / 1000 + "&offset=2"); + now.getMillis() / 1000 + "&limit=1&offset=2");
assertEquals(httpMethod.getMethod(), HttpMethod.GET); assertEquals(httpMethod.getMethod(), HttpMethod.GET);
assertEquals(httpMethod.getHeaders().size(), 0); assertEquals(httpMethod.getHeaders().size(), 0);
assertEquals(processor.createResponseParser(method, httpMethod).getClass(), assertEquals(processor.createResponseParser(method, httpMethod).getClass(),
@ -272,8 +272,8 @@ public class CloudServersClientTest {
new Object[] { changesSince(now).maxResults(1).startAt(2) }); new Object[] { changesSince(now).maxResults(1).startAt(2) });
assertEquals(httpMethod.getEndpoint().getHost(), "localhost"); assertEquals(httpMethod.getEndpoint().getHost(), "localhost");
assertEquals(httpMethod.getEndpoint().getPath(), "/flavors"); assertEquals(httpMethod.getEndpoint().getPath(), "/flavors");
assertEquals(httpMethod.getEndpoint().getQuery(), "format=json" + "&limit=1&changes-since=" assertEquals(httpMethod.getEndpoint().getQuery(), "format=json&changes-since="
+ now.getMillis() / 1000 + "&offset=2"); + now.getMillis() / 1000 + "&limit=1&offset=2");
assertEquals(httpMethod.getMethod(), HttpMethod.GET); assertEquals(httpMethod.getMethod(), HttpMethod.GET);
assertEquals(httpMethod.getHeaders().size(), 0); assertEquals(httpMethod.getHeaders().size(), 0);
assertEquals(processor.createResponseParser(method, httpMethod).getClass(), assertEquals(processor.createResponseParser(method, httpMethod).getClass(),
@ -303,8 +303,8 @@ public class CloudServersClientTest {
new Object[] { withDetails().changesSince(now).maxResults(1).startAt(2) }); new Object[] { withDetails().changesSince(now).maxResults(1).startAt(2) });
assertEquals(httpMethod.getEndpoint().getHost(), "localhost"); assertEquals(httpMethod.getEndpoint().getHost(), "localhost");
assertEquals(httpMethod.getEndpoint().getPath(), "/flavors/detail"); assertEquals(httpMethod.getEndpoint().getPath(), "/flavors/detail");
assertEquals(httpMethod.getEndpoint().getQuery(), "format=json" + "&limit=1&changes-since=" assertEquals(httpMethod.getEndpoint().getQuery(), "format=json&changes-since="
+ now.getMillis() / 1000 + "&offset=2"); + now.getMillis() / 1000 + "&limit=1&offset=2");
assertEquals(httpMethod.getMethod(), HttpMethod.GET); assertEquals(httpMethod.getMethod(), HttpMethod.GET);
assertEquals(httpMethod.getHeaders().size(), 0); assertEquals(httpMethod.getHeaders().size(), 0);
assertEquals(processor.createResponseParser(method, httpMethod).getClass(), assertEquals(processor.createResponseParser(method, httpMethod).getClass(),
@ -365,8 +365,8 @@ public class CloudServersClientTest {
new Object[] { changesSince(now).maxResults(1).startAt(2) }); new Object[] { changesSince(now).maxResults(1).startAt(2) });
assertEquals(httpMethod.getEndpoint().getHost(), "localhost"); assertEquals(httpMethod.getEndpoint().getHost(), "localhost");
assertEquals(httpMethod.getEndpoint().getPath(), "/images"); assertEquals(httpMethod.getEndpoint().getPath(), "/images");
assertEquals(httpMethod.getEndpoint().getQuery(), "format=json" + "&limit=1&changes-since=" assertEquals(httpMethod.getEndpoint().getQuery(), "format=json&changes-since="
+ now.getMillis() / 1000 + "&offset=2"); + now.getMillis() / 1000 + "&limit=1&offset=2");
assertEquals(httpMethod.getMethod(), HttpMethod.GET); assertEquals(httpMethod.getMethod(), HttpMethod.GET);
assertEquals(httpMethod.getHeaders().size(), 0); assertEquals(httpMethod.getHeaders().size(), 0);
assertEquals(processor.createResponseParser(method, httpMethod).getClass(), assertEquals(processor.createResponseParser(method, httpMethod).getClass(),
@ -381,8 +381,8 @@ public class CloudServersClientTest {
new Object[] { withDetails().changesSince(now).maxResults(1).startAt(2) }); new Object[] { withDetails().changesSince(now).maxResults(1).startAt(2) });
assertEquals(httpMethod.getEndpoint().getHost(), "localhost"); assertEquals(httpMethod.getEndpoint().getHost(), "localhost");
assertEquals(httpMethod.getEndpoint().getPath(), "/images/detail"); assertEquals(httpMethod.getEndpoint().getPath(), "/images/detail");
assertEquals(httpMethod.getEndpoint().getQuery(), "format=json" + "&limit=1&changes-since=" assertEquals(httpMethod.getEndpoint().getQuery(), "format=json&changes-since="
+ now.getMillis() / 1000 + "&offset=2"); + now.getMillis() / 1000 + "&limit=1&offset=2");
assertEquals(httpMethod.getMethod(), HttpMethod.GET); assertEquals(httpMethod.getMethod(), HttpMethod.GET);
assertEquals(httpMethod.getHeaders().size(), 0); assertEquals(httpMethod.getHeaders().size(), 0);
assertEquals(processor.createResponseParser(method, httpMethod).getClass(), assertEquals(processor.createResponseParser(method, httpMethod).getClass(),
@ -585,8 +585,8 @@ public class CloudServersClientTest {
new Object[] { changesSince(now).maxResults(1).startAt(2) }); new Object[] { changesSince(now).maxResults(1).startAt(2) });
assertEquals(httpMethod.getEndpoint().getHost(), "localhost"); assertEquals(httpMethod.getEndpoint().getHost(), "localhost");
assertEquals(httpMethod.getEndpoint().getPath(), "/shared_ip_groups"); assertEquals(httpMethod.getEndpoint().getPath(), "/shared_ip_groups");
assertEquals(httpMethod.getEndpoint().getQuery(), "format=json" + "&limit=1&changes-since=" assertEquals(httpMethod.getEndpoint().getQuery(), "format=json&changes-since="
+ now.getMillis() / 1000 + "&offset=2"); + now.getMillis() / 1000 + "&limit=1&offset=2");
assertEquals(httpMethod.getMethod(), HttpMethod.GET); assertEquals(httpMethod.getMethod(), HttpMethod.GET);
assertEquals(httpMethod.getHeaders().size(), 0); assertEquals(httpMethod.getHeaders().size(), 0);
assertEquals(processor.createResponseParser(method, httpMethod).getClass(), assertEquals(processor.createResponseParser(method, httpMethod).getClass(),
@ -619,8 +619,8 @@ public class CloudServersClientTest {
new Object[] { withDetails().changesSince(now).maxResults(1).startAt(2) }); new Object[] { withDetails().changesSince(now).maxResults(1).startAt(2) });
assertEquals(httpMethod.getEndpoint().getHost(), "localhost"); assertEquals(httpMethod.getEndpoint().getHost(), "localhost");
assertEquals(httpMethod.getEndpoint().getPath(), "/shared_ip_groups/detail"); assertEquals(httpMethod.getEndpoint().getPath(), "/shared_ip_groups/detail");
assertEquals(httpMethod.getEndpoint().getQuery(), "format=json" + "&limit=1&changes-since=" assertEquals(httpMethod.getEndpoint().getQuery(), "format=json&changes-since="
+ now.getMillis() / 1000 + "&offset=2"); + now.getMillis() / 1000 + "&limit=1&offset=2");
assertEquals(httpMethod.getMethod(), HttpMethod.GET); assertEquals(httpMethod.getMethod(), HttpMethod.GET);
assertEquals(httpMethod.getHeaders().size(), 0); assertEquals(httpMethod.getHeaders().size(), 0);
assertEquals(processor.createResponseParser(method, httpMethod).getClass(), assertEquals(processor.createResponseParser(method, httpMethod).getClass(),