Package org.jclouds.glesys.domain

Examples of org.jclouds.glesys.domain.EmailOverview$Builder


      assertEquals(alias.getForwardTo(), "test@" + testDomain);

      EmailAlias aliasFromList = Iterables.getOnlyElement(emailAccountApi.listAliasesInDomain(testDomain));
      assertEquals(aliasFromList, alias);

      EmailOverview overview = emailAccountApi.getOverview();
      assertEquals(1, overview.getSummary().getAliases());

      alias = emailAccountApi.updateAlias("test2@" + testDomain, "test1@" + testDomain);
      overview = emailAccountApi.getOverview();
      assertEquals(1, overview.getSummary().getAliases());

      aliasFromList = Iterables.getOnlyElement(emailAccountApi.listAliasesInDomain(testDomain));
      assertEquals(aliasFromList, alias);

      emailAccountApi.delete("test2@" + testDomain);
      overview = emailAccountApi.getOverview();
      assertEquals(0, overview.getSummary().getAliases());
   }
View Full Code Here


      assertEquals(0, overview.getSummary().getAliases());
   }

   @Test(dependsOnMethods = "testCreateEmail")
   public void testOverview() throws Exception {
      EmailOverview overview = emailAccountApi.getOverview();
      assertNotNull(overview.getSummary());
      assertTrue(overview.getSummary().getAccounts() > 0);
      assertTrue(overview.getSummary().getAliases() > -1);
      assertTrue(overview.getSummary().getMaxAccounts() > 0);
      assertTrue(overview.getSummary().getMaxAliases() > 0);
      assertNotNull(overview.gets());
      assertFalse(overview.gets().isEmpty());

      EmailOverviewDomain domain = EmailOverviewDomain.builder().domain(testDomain).accounts(1).build();
      assertTrue(overview.gets().contains(domain));
   }
View Full Code Here

                       .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==").build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/email_overview.json")).build()).getEmailAccountApi();

      EmailOverviewSummary summary = EmailOverviewSummary.builder().accounts(2).maxAccounts(50).aliases(1).maxAliases(1000).build();
      EmailOverviewDomain domain = EmailOverviewDomain.builder().domain("cl13016.test.jclouds.org").accounts(2).aliases(0).build();
      EmailOverview expected = EmailOverview.builder().summary(summary).domains(domain).build();

      assertEquals(api.getOverview(), expected);
   }
View Full Code Here

                       .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==").build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/email_overview.json")).build()).getEmailAccountApi();

      EmailOverviewSummary summary = EmailOverviewSummary.builder().accounts(2).maxAccounts(50).aliases(1).maxAliases(1000).build();
      EmailOverviewDomain domain = EmailOverviewDomain.builder().domain("cl13016.test.jclouds.org").accounts(2).aliases(0).build();
      EmailOverview expected = EmailOverview.builder().summary(summary).domains(domain).build();

      assertEquals(api.getOverview(), expected);
   }
View Full Code Here

                       .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==").build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/email_overview.json")).build()).getEmailAccountApi();

      EmailOverviewSummary summary = EmailOverviewSummary.builder().accounts(2).maxAccounts(50).aliases(1).maxAliases(1000).build();
      EmailOverviewDomain domain = EmailOverviewDomain.builder().domain("cl13016.test.jclouds.org").accounts(2).aliases(0).build();
      EmailOverview expected = EmailOverview.builder().summary(summary).domains(domain).build();

      assertEquals(api.getOverview(), expected);
   }
View Full Code Here

      assertEquals(alias.getForwardTo(), "test@" + testDomain);

      EmailAlias aliasFromList = Iterables.getOnlyElement(emailAccountApi.listAliasesInDomain(testDomain));
      assertEquals(aliasFromList, alias);

      EmailOverview overview = emailAccountApi.getOverview();
      assertEquals(1, overview.getSummary().getAliases());

      alias = emailAccountApi.updateAlias("test2@" + testDomain, "test1@" + testDomain);
      overview = emailAccountApi.getOverview();
      assertEquals(1, overview.getSummary().getAliases());

      aliasFromList = Iterables.getOnlyElement(emailAccountApi.listAliasesInDomain(testDomain));
      assertEquals(aliasFromList, alias);

      emailAccountApi.delete("test2@" + testDomain);
      overview = emailAccountApi.getOverview();
      assertEquals(0, overview.getSummary().getAliases());
   }
View Full Code Here

      assertEquals(0, overview.getSummary().getAliases());
   }

   @Test(dependsOnMethods = "testCreateEmail")
   public void testOverview() throws Exception {
      EmailOverview overview = emailAccountApi.getOverview();
      assertNotNull(overview.getSummary());
      assertTrue(overview.getSummary().getAccounts() > 0);
      assertTrue(overview.getSummary().getAliases() > -1);
      assertTrue(overview.getSummary().getMaxAccounts() > 0);
      assertTrue(overview.getSummary().getMaxAliases() > 0);
      assertNotNull(overview.gets());
      assertFalse(overview.gets().isEmpty());

      EmailOverviewDomain domain = EmailOverviewDomain.builder().domain(testDomain).accounts(1).build();
      assertTrue(overview.gets().contains(domain));
   }
View Full Code Here

                       .addHeader("Authorization", "Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==").build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/email_overview.json")).build()).getEmailAccountApi();

      EmailOverviewSummary summary = EmailOverviewSummary.builder().accounts(2).maxAccounts(50).aliases(1).maxAliases(1000).build();
      EmailOverviewDomain domain = EmailOverviewDomain.builder().domain("cl13016.test.jclouds.org").accounts(2).aliases(0).build();
      EmailOverview expected = EmailOverview.builder().summary(summary).domains(domain).build();

      assertEquals(api.getOverview(), expected);
   }
View Full Code Here

      assertEquals(alias.getForwardTo(), "test@" + testDomain);

      EmailAlias aliasFromList = Iterables.getOnlyElement(emailAccountApi.listAliasesInDomain(testDomain));
      assertEquals(aliasFromList, alias);

      EmailOverview overview = emailAccountApi.getOverview();
      assertEquals(1, overview.getSummary().getAliases());

      alias = emailAccountApi.updateAlias("test2@" + testDomain, "test1@" + testDomain);
      overview = emailAccountApi.getOverview();
      assertEquals(1, overview.getSummary().getAliases());

      aliasFromList = Iterables.getOnlyElement(emailAccountApi.listAliasesInDomain(testDomain));
      assertEquals(aliasFromList, alias);

      emailAccountApi.delete("test2@" + testDomain);
      overview = emailAccountApi.getOverview();
      assertEquals(0, overview.getSummary().getAliases());
   }
View Full Code Here

      assertEquals(0, overview.getSummary().getAliases());
   }

   @Test(dependsOnMethods = "testCreateEmail")
   public void testOverview() throws Exception {
      EmailOverview overview = emailAccountApi.getOverview();
      assertNotNull(overview.getSummary());
      assertTrue(overview.getSummary().getAccounts() > 0);
      assertTrue(overview.getSummary().getAliases() > -1);
      assertTrue(overview.getSummary().getMaxAccounts() > 0);
      assertTrue(overview.getSummary().getMaxAliases() > 0);
      assertNotNull(overview.gets());
      assertFalse(overview.gets().isEmpty());

      EmailOverviewDomain domain = EmailOverviewDomain.builder().domain(testDomain).accounts(1).build();
      assertTrue(overview.gets().contains(domain));
   }
View Full Code Here

TOP

Related Classes of org.jclouds.glesys.domain.EmailOverview$Builder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.