jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)
Date Wed, 05 Feb 2014 18:40:24 GMT
> @@ -285,4 +279,36 @@ public void testinboundPortsStatic() {
>        assertEquals(options.getInboundPorts()[0], 22);
>        assertEquals(options.getInboundPorts()[1], 30);
>     }
> +
> +   @Test
> +   public void testMaxCountDefault() {
> +      EC2TemplateOptions options = new EC2TemplateOptions();
> +      assertEquals(options.getMaxCount(), 0);
> +   }
> +
> +   @Test
> +   public void testMaxCount() {
> +      EC2TemplateOptions options = new EC2TemplateOptions();
> +      options.maxCount(2);
> +      assertEquals(options.getMaxCount(), 2);
> +   }

> That's kind of implicit in testMaxCountDefault(), isn't it?

I see what you mean, but there's a difference between just seeing what happens if the user
does _nothing_ vs. when the user explicitly tries to set `null`. After all, in the latter
case we could throw an NPE. But also fine with not adding a test case if you feel it's unnecessary.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9472208
Mime
View raw message