Examples of Car


Examples of org.infinispan.query.queries.faceting.Car

      createClusteredCaches(2, cacheCfg);
   }

   public void testInitMapper() throws InterruptedException {
      cache(0).put("key1", new Car("ford", "blue", 160));
      cache(1).put("key2", new Car("bmw", "black", 160));
      cache(0).put("key3", new Car("mersedes", "white", 160));

      Map result = new MapReduceTask<Object, Object, Object, LuceneWork>(cache(0))
            .mappedWith(new SomeMapper())
            .reducedWith(new IndexingReducer())
            .execute();
View Full Code Here

Examples of org.infinispan.query.queries.faceting.Car

      Assert.assertTrue(result.isEmpty());
   }

   public void testInitReducer () throws InterruptedException {
      cache(0).put("key1", new Car("ford", "blue", 160));
      cache(1).put("key2", new Car("bmw", "black", 160));
      cache(0).put("key3", new Car("mersedes", "white", 160));

      Map result = new MapReduceTask<Object, Object, Object, LuceneWork>(cache(0))
            .mappedWith(new IndexingMapper())
            .reducedWith(new SomeReducer())
            .execute();
View Full Code Here

Examples of org.infinispan.query.queries.faceting.Car

            .keyword()
            .onField("make")
            .matching("ford")
            .createQuery();

      cache.put("car1", new Car("ford", "white", 300));
      cache.put("car2", new Car("ford", "blue", 300));
      cache.put("car3", new Car("ford", "red", 300));

      // ensure these were not indexed
      assertEquals(0, searchManager.getQuery(query, Car.class).getResultSize());

      //reindex
View Full Code Here

Examples of org.infinispan.query.queries.faceting.Car

   @Test(groups = "unstable", description = "See ISPN-4043")
   public void testReindexing() throws Exception {
      for(int i = 0; i < 200; i++) {
         caches.get(i % 2).getAdvancedCache().withFlags(Flag.SKIP_INDEXING).put(key("F" + i + "NUM"),
                                                                                new Car((i % 2 == 0 ? "megane" : "bmw"), "blue", 300 + i));
      }

      //Adding also non-indexed values
      caches.get(0).getAdvancedCache().put(key("FNonIndexed1NUM"), new NotIndexedType("test1"));
      caches.get(0).getAdvancedCache().put(key("FNonIndexed2NUM"), new NotIndexedType("test2"));
View Full Code Here

Examples of org.infinispan.query.queries.faceting.Car

      }
      waitForClusterToForm(neededCacheNames);
   }

   public void testReindexing() throws Exception {
      caches.get(0).put(key("F1NUM"), new Car("megane", "white", 300));
      verifyFindsCar(1, "megane");
      caches.get(1).put(key("F2NUM"), new Car("megane", "blue", 300));
      verifyFindsCar(2, "megane");
      //add an entry without indexing it:
      caches.get(1).getAdvancedCache().withFlags(Flag.SKIP_INDEXING).put(key("F3NUM"), new Car("megane", "blue", 300));
      verifyFindsCar(2, "megane");
      //re-sync datacontainer with indexes:
      rebuildIndexes();
      verifyFindsCar(3, "megane");
      //verify we cleanup old stale index values:
View Full Code Here

Examples of org.infinispan.query.queries.faceting.Car

      }
      waitForClusterToForm(neededCacheNames);
   }

   public void testManualIndexing() throws Exception {
      caches.get(0).put("car A", new Car("ford", "blue", 400));
      caches.get(0).put("car B", new Car("megane", "white", 300));
      caches.get(0).put("car C", new Car("megane", "red", 500));

      assertNumberOfCars(0, "megane");
      assertNumberOfCars(0, "ford");

      // rebuild index
View Full Code Here

Examples of org.infinispan.query.queries.faceting.Car

            .keyword()
            .onField("make")
            .matching("ford")
            .createQuery();

      cache.put("car1", new Car("ford", "white", 300));
      cache.put("car2", new Car("ford", "blue", 300));
      cache.put("car3", new Car("ford", "red", 300));

      // ensure these were not indexed
      assertEquals(0, searchManager.getQuery(query, Car.class).getResultSize());

      //reindex
View Full Code Here

Examples of org.infinispan.query.queries.faceting.Car

public class MassIndexingTest extends DistributedMassIndexingTest {

   public void testReindexing() throws Exception {
      for(int i = 0; i < 200; i++) {
         caches.get(i % 2).getAdvancedCache().withFlags(Flag.SKIP_INDEXING).put(key("F" + i + "NUM"),
                                                                                new Car((i % 2 == 0 ? "megane" : "bmw"), "blue", 300 + i));
      }

      //Adding also non-indexed values
      caches.get(0).getAdvancedCache().put(key("FNonIndexed1NUM"), new NotIndexedType("test1"));
      caches.get(0).getAdvancedCache().put(key("FNonIndexed2NUM"), new NotIndexedType("test2"));
View Full Code Here

Examples of org.infinispan.query.queries.faceting.Car

      }
      waitForClusterToForm(neededCacheNames);
   }

   public void testReindexing() throws Exception {
      caches.get(0).put(key("F1NUM"), new Car("megane", "white", 300));
      verifyFindsCar(1, "megane");
      caches.get(1).put(key("F2NUM"), new Car("megane", "blue", 300));
      verifyFindsCar(2, "megane");
      //add an entry without indexing it:
      caches.get(1).getAdvancedCache().withFlags(Flag.SKIP_INDEXING).put(key("F3NUM"), new Car("megane", "blue", 300));
      verifyFindsCar(2, "megane");
      //re-sync datacontainer with indexes:
      rebuildIndexes();
      verifyFindsCar(3, "megane");
      //verify we cleanup old stale index values:
View Full Code Here

Examples of org.jboss.aerogear.controller.Car

                        .to(SampleController.class).save(param("color"), param("brand"));
            }
        }).requestMethod(POST).acceptHeader(HTML).param("color", "red").param("brand", "Ferrari");
        routeTester.spyController(new SampleController());
        final InvocationResult r = routeTester.process("/cars");
        final Car car = (Car) r.getResult();
        assertThat(car.getColor()).isEqualTo("red");
        assertThat(car.getBrand()).isEqualTo("Ferrari");
        verify(routeTester.jspResponder()).respond(any(), any(RouteContext.class));
    }
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.