Package com.openshift.client.cartridge.query

Examples of com.openshift.client.cartridge.query.StringPropertyQuery


  public void shouldMatchingCartridgeName() {
    // pre-conditions
    List<IEmbeddedCartridge> embeddedCartridges = CartridgeTestUtils.createEmbeddedCartridgeMocks(
        "Timberlake", "TimAndStrupi");

    StringPropertyQuery selector = new StringPropertyQuery("Tim.*") {

      @Override
      protected <C extends ICartridge> String getProperty(C cartridge) {
        return cartridge.getName();
      }

    };

    // operation
    IEmbeddedCartridge matchingCartridge = selector.get(embeddedCartridges);
    Collection<IEmbeddedCartridge> matchingCartridges = selector.getAll(embeddedCartridges);

    // verification
    assertThat(matchingCartridge).isNotNull();
    assertThat(matchingCartridge.getName()).isEqualTo("Timberlake");
    assertThat(matchingCartridges).onProperty("name").containsOnly("Timberlake", "TimAndStrupi");
View Full Code Here


            "Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, "
                + "scalable network applications. Node.js is perfect for data-intensive real-time "
                + "applications that run across distributed devices."
                , false)
        );
    StringPropertyQuery query = new StringPropertyQuery(".+platform built on Chrome's JavaScript runtime.+") {

      @Override
      protected <C extends ICartridge> String getProperty(C cartridge) {
        return cartridge.getDescription();
      }
    };
    // operation
    IStandaloneCartridge nodeJs = query.get(standaloneCartridges);

    // verification
    new CartridgeAssert<IStandaloneCartridge>(nodeJs)
        .hasName("nodejs-0.6");
View Full Code Here

TOP

Related Classes of com.openshift.client.cartridge.query.StringPropertyQuery

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.