You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Andrew Gaul <no...@github.com> on 2014/06/29 21:42:49 UTC

[jclouds-labs-aws] Use assertj fluent assertions where appropriate (#32)

This commit demonstrates a few instances where assertj yields more
informative error messages than testng assertEquals and assertTrue.
Note that we could replace all testng asserts with assertj.
You can merge this Pull Request by running:

  git pull https://github.com/andrewgaul/jclouds-labs-aws assertj

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds-labs-aws/pull/32

-- Commit Summary --

  * Use assertj fluent assertions where appropriate

-- File Changes --

    M glacier/pom.xml (6)
    M glacier/src/test/java/org/jclouds/glacier/GlacierClientLiveTest.java (17)
    M glacier/src/test/java/org/jclouds/glacier/GlacierClientMockTest.java (5)

-- Patch Links --

https://github.com/jclouds/jclouds-labs-aws/pull/32.patch
https://github.com/jclouds/jclouds-labs-aws/pull/32.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/32

Re: [jclouds-labs-aws] Use assertj fluent assertions where appropriate (#32)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-aws-pull-requests #63](https://jclouds.ci.cloudbees.com/job/jclouds-labs-aws-pull-requests/63/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/32#issuecomment-47471340

Re: [jclouds-labs-aws] Use assertj fluent assertions where appropriate (#32)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-aws-pull-requests #64](https://jclouds.ci.cloudbees.com/job/jclouds-labs-aws-pull-requests/64/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/32#issuecomment-47478715

Re: [jclouds-labs-aws] Use assertj fluent assertions where appropriate (#32)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-aws #1059](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-aws/1059/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/32#issuecomment-47471298

Re: [jclouds-labs-aws] Use assertj fluent assertions where appropriate (#32)

Posted by Andrew Gaul <no...@github.com>.
>     }
>  
>     @Test(groups = { "integration", "live" }, dependsOnMethods = { "testCreateVault" })
>     public void testListMultipartUploadsWithEmptyList() throws Exception {
> -      assertEquals(api.listMultipartUploads(VAULT_NAME1).size(), 0);
> +      assertThat(api.listMultipartUploads(VAULT_NAME1)).hasSize(0);

Done in 165a50d1cbaf28dbe76a34fc72a07fb6f845369d.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/32/files#r14440746

Re: [jclouds-labs-aws] Use assertj fluent assertions where appropriate (#32)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-aws #1060](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-aws/1060/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/32#issuecomment-47478674

Re: [jclouds-labs-aws] Use assertj fluent assertions where appropriate (#32)

Posted by Andrew Phillips <no...@github.com>.
>     }
>  
>     @Test(groups = { "integration", "live" }, dependsOnMethods = { "testCreateVault" })
>     public void testListMultipartUploadsWithEmptyList() throws Exception {
> -      assertEquals(api.listMultipartUploads(VAULT_NAME1).size(), 0);
> +      assertThat(api.listMultipartUploads(VAULT_NAME1)).hasSize(0);

Is there an `isEmpty()` method? ;-)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/32/files#r14413854

Re: [jclouds-labs-aws] Use assertj fluent assertions where appropriate (#32)

Posted by Andrew Gaul <no...@github.com>.
Closed #32.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/32#event-136789606

Re: [jclouds-labs-aws] Use assertj fluent assertions where appropriate (#32)

Posted by Andrew Phillips <no...@github.com>.
+1 - looks good to me, too. Thanks, @andrewgaul!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/32#issuecomment-47677326

Re: [jclouds-labs-aws] Use assertj fluent assertions where appropriate (#32)

Posted by Matt Stephenson <no...@github.com>.
LGTM

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/32#issuecomment-47487684

Re: [jclouds-labs-aws] Use assertj fluent assertions where appropriate (#32)

Posted by Alex Heneveld <no...@github.com>.
+1 assertj where have you been all my life?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/32#issuecomment-47507258

Re: [jclouds-labs-aws] Use assertj fluent assertions where appropriate (#32)

Posted by Andrew Gaul <no...@github.com>.
Pushed to master as 405a6d56687a955bcf0a95e41d7052d994b2c38c.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/32#issuecomment-47609725