Package org.jclouds.vcloud.domain

Examples of org.jclouds.vcloud.domain.ReferenceType


   }

   @Test
   public void testReturnsResourceMatchingDefaultPredicateWhenConfigurationUnspecified() {
      ReferenceType reference1 = createMock(ReferenceType.class);
      ReferenceType reference2 = createMock(ReferenceType.class);

      assertEquals(new OnlyReferenceTypeFirstWithNameMatchingConfigurationKeyOrDefault(valueOfConfigurationKeyOrNull,
            "foo", Predicates.equalTo(reference2)).apply(ImmutableList.<ReferenceType> of(reference1, reference2)),
            reference2);
View Full Code Here


   }

   @Test
   public void testReturnsResourceWithNameMatchingConfigurationKey() {
      ReferenceType reference1 = new ReferenceTypeImpl("travis tritt", null, null);
      ReferenceType reference2 = new ReferenceTypeImpl("hail mary", null, null);

      assertEquals(
            new OnlyReferenceTypeFirstWithNameMatchingConfigurationKeyOrDefault(Guice.createInjector(
                  new AbstractModule() {
                     protected void configure() {
View Full Code Here

   }

   @Test(expectedExceptions = NoSuchElementException.class)
   public void testThrowsNoSuchElementWhenNoneMatchConfigurationKey() {
      ReferenceType reference1 = new ReferenceTypeImpl("travis tritt", null, null);
      ReferenceType reference2 = new ReferenceTypeImpl("hail mary", null, null);

      new OnlyReferenceTypeFirstWithNameMatchingConfigurationKeyOrDefault(Guice.createInjector(new AbstractModule() {
         protected void configure() {
            bindConstant().annotatedWith(Names.named("foo")).to(".*happy.*");
         }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.domain.ReferenceType

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.