Examples of apply()


Examples of org.jboss.jms.selector.Operator.apply()

   {
      // Neg Long
      log.trace("parse(-12345 = -1 * 12345)");
      Operator result = (Operator) parser.parse("-12345 = -1 * 12345", identifierMap);
      log.trace("result -> "+result);
      Boolean b = (Boolean) result.apply();
      assertTrue("is true", b.booleanValue());

      // Neg Double
      log.trace("parse(-1 * 12345.67 = -12345.67)");
      result = (Operator) parser.parse("-1 * 12345.67 = -12345.67", identifierMap);
View Full Code Here

Examples of org.jboss.jms.server.selector.Operator.apply()

   {
      // Neg Long
      log.trace("parse(-12345 = -1 * 12345)");
      Operator result = (Operator) parser.parse("-12345 = -1 * 12345", identifierMap);
      log.trace("result -> "+result);
      Boolean b = (Boolean) result.apply();
      assertTrue("is true", b.booleanValue());

      // Neg Double
      log.trace("parse(-1 * 12345.67 = -12345.67)");
      result = (Operator) parser.parse("-1 * 12345.67 = -12345.67", identifierMap);
View Full Code Here

Examples of org.jboss.soa.esb.util.FreeMarkerTemplate.apply()

        FreeMarkerTemplate template = new FreeMarkerTemplate("templates/web.xml.ftl", WebDeploymentArchive.class);
        Map contextObj = new HashMap();

        contextObj.put("webModel", webModel);
       
        return template.apply(contextObj);
    }

    private void addJBossWebXML() throws ConfigurationException {
        try {
            String jbossWebXml = getJBossWebXML();
View Full Code Here

Examples of org.jclouds.abiquo.functions.AppendApiVersionToAbiquoMimeType.apply()

@Test(groups = "unit", testName = "AppendApiVersionToAbiquoMimeTypeTest")
public class AppendApiVersionToAbiquoMimeTypeTest {
   @Test(expectedExceptions = NullPointerException.class)
   public void testApplyWithNullInput() {
      Function<String, String> function = new AppendApiVersionToAbiquoMimeType(AbiquoApi.API_VERSION);
      function.apply(null);
   }

   @Test(expectedExceptions = IllegalArgumentException.class)
   public void testApplyWithInvalidMediaType() {
      Function<String, String> function = new AppendApiVersionToAbiquoMimeType(AbiquoApi.API_VERSION);
View Full Code Here

Examples of org.jclouds.aws.ec2.functions.ImportOrReturnExistingKeypair.apply()

    ImportOrReturnExistingKeypair importer = new ImportOrReturnExistingKeypair(
        ec2Client);

    RegionNameAndPublicKeyMaterial regionNameAndKey = new RegionNameAndPublicKeyMaterial(
        region, keyPairName, publicKey);
    KeyPair keyPair = importer.apply(regionNameAndKey);

    if (keyPair != null) {

      iaasInfo.getTemplate().getOptions().as(AWSEC2TemplateOptions.class)
          .keyPair(keyPair.getKeyName());
View Full Code Here

Examples of org.jclouds.blobstore.functions.BlobToHttpGetOptions.apply()

   @Test
   void testOneRange() {
      BlobToHttpGetOptions converter = new BlobToHttpGetOptions();
      org.jclouds.blobstore.options.GetOptions blobGet = new org.jclouds.blobstore.options.GetOptions()
            .range(2, 5);
      GetOptions httpGet = converter.apply(blobGet);
      assertEquals(httpGet.buildRequestHeaders().get("Range"), ImmutableSet
            .of("bytes=2-5"));

   }
}
View Full Code Here

Examples of org.jclouds.chef.servlet.functions.InitParamsToProperties.apply()

    Properties props = new Properties();
    props.setProperty("foo", "bar");

    expect(servletContext.getContextPath()).andReturn("path");
    expect(servletContext.getServerInfo()).andReturn("serverinfo");
    expect(converter.apply(servletContext)).andReturn(props);

    replay(servletContext);
    replay(converter);

    Injector injector = Guice.createInjector(new GsonModule(),
View Full Code Here

Examples of org.jclouds.cloudstack.functions.WindowsLoginCredentialsFromEncryptedData.apply()

      assertEquals(actual, expected);

      WindowsLoginCredentialsFromEncryptedData passwordDecrypt = new WindowsLoginCredentialsFromEncryptedData(new JCECrypto());

      assertEquals(passwordDecrypt.apply(
         EncryptedPasswordAndPrivateKey.builder().encryptedPassword(actual).privateKey(privateKey).build()).getPassword(), "bX7vvptvw");
   }
  
   HttpRequest deployVirtualMachineInZone =  HttpRequest.builder().method("GET")
      .endpoint("http://localhost:8080/client/api")
View Full Code Here

Examples of org.jclouds.cloudstack.strategy.BlockUntilJobCompletesAndReturnResult.apply()

      AsyncCreateResponse job = AsyncCreateResponse.builder().id("1").jobId("2").build();
      // make sure we created the job relating to a new ip
      expect(addressClient.associateIPAddressInZone(zoneId, networkId(networkId))).andReturn(job);

      expect(blockUntilJobCompletesAndReturnResult.apply(job)).andReturn(address);

      replay(client);
      replay(addressClient);
      replay(blockUntilJobCompletesAndReturnResult);
View Full Code Here

Examples of org.jclouds.compute.callables.BlockUntilInitScriptStatusIsZeroThenReturnOutput.ExitStatusOfCommandGreaterThanZero.apply()

               .createStrictMock();
      expect(commandRunner.runAction("status")).andReturn(new ExecResponse("", "", 1));
      replay(commandRunner);

      Predicate<String> pred = new ExitStatusOfCommandGreaterThanZero(commandRunner);
      assertEquals(pred.apply("status"), true);

      verify(commandRunner);

   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.