Package com.opengamma.engine.target

Examples of com.opengamma.engine.target.Primitive


  }

  public void testGetAvailability_uniqueId() {
    final MarketDataAvailabilityProvider availability = create();
    final ComputationTargetSpecification targetSpec = new ComputationTargetSpecification(ComputationTargetType.SECURITY, UniqueId.of("Security", "Foo"));
    final Object target = new Primitive(UniqueId.of("Security", "Foo"));
    final ValueRequirement desiredValue = new ValueRequirement("Bar", targetSpec);
    assertEquals(availability.getAvailability(targetSpec, target, desiredValue).getProperty(ValuePropertyNames.FUNCTION), "uniqueId");
  }
View Full Code Here


      protected void populateAvailabilityHintKey(final Collection<Serializable> key) {
        // Don't care
      }

    };
    final Object target = new Primitive(targetSpec.getUniqueId());
    assertTrue(filter.isAvailable(targetSpec, target, desiredValue));
    final AbstractMarketDataAvailabilityProvider provider = Mockito.mock(AbstractMarketDataAvailabilityProvider.class);
    final ValueSpecification valueSpec = new ValueSpecification(desiredValue.getValueName(), targetSpec, ValueProperties.with(ValuePropertyNames.FUNCTION, "Mock").get());
    Mockito.when(provider.getAvailability(targetSpec, targetSpec.getUniqueId(), desiredValue)).thenReturn(valueSpec);
    assertEquals(filter.withProvider(provider).getAvailability(targetSpec, target, desiredValue), valueSpec);
View Full Code Here

            }
          }
        }
      }
    }
    return new Primitive(uniqueId);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.engine.target.Primitive

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.