Examples of Car


Examples of org.jboss.arquillian.qunit.showcase.model.Car

@ApplicationScoped
public class CarRepository {

    public List<Car> findAllCars() {
        List<Car> list = new ArrayList<Car>(1);
        Car car = new Car("QWE123", "Model_1", "Black");
        list.add(car);
        return list;
    }
View Full Code Here

Examples of org.jboss.as.quickstart.cdi.veto.model.Car

    }

    @Test
    public void assertSavingANewCarFunctions() {
        final Car car = carInstance.get();
        car.setColor("blue");
        car.setMake("Ford");
        car.setModel("Mustang");
        carManager.save(car);
        assertThat(car.getId(), notNullValue());
    }
View Full Code Here

Examples of org.jboss.as.quickstarts.datagrid.carmart.model.Car

        utx = getUserTransactionFromJNDI();

        try {
            utx.begin();
            Car c = new Car("Ford Focus", 1.6, CarType.COMBI, "white", "FML 23-25", Country.CZECH_REPUBLIC);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            c = new Car("BMW X3", 2.0, CarType.SEDAN, "gray", "1P3 2632", Country.CZECH_REPUBLIC);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            c = new Car("Ford Mondeo", 2.2, CarType.COMBI, "blue", "1B2 1111", Country.USA);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            c = new Car("Mazda MX-5", 1.8, CarType.CABRIO, "red", "6T4 2526", Country.USA);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            c = new Car("VW Golf", 1.6, CarType.HATCHBACK, "yellow", "2B2 4946", Country.GERMANY);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            // insert a list of cars' number plates
            cars.put(CarManager.CAR_NUMBERS_KEY, carNumbers);
            utx.commit();
            log.info("Successfully imported data!");
        } catch (Exception e) {
View Full Code Here

Examples of org.jboss.as.quickstarts.datagrid.carmart.model.Car

       
        tm = ((CacheImpl) cars).getAdvancedCache().getTransactionManager();
       
        try {
            tm.begin();
            Car c = new Car("Ford Focus", 1.6, CarType.COMBI, "white", "FML 23-25", Country.CZECH_REPUBLIC);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            c = new Car("BMW X3", 2.0, CarType.SEDAN, "gray", "1P3 2632", Country.CZECH_REPUBLIC);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            c = new Car("Ford Mondeo", 2.2, CarType.COMBI, "blue", "1B2 1111", Country.USA);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            c = new Car("Mazda MX-5", 1.8, CarType.CABRIO, "red", "6T4 2526", Country.USA);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            c = new Car("VW Golf", 1.6, CarType.HATCHBACK, "yellow", "2B2 4946", Country.GERMANY);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            // insert a list of cars' number plates
            cars.put(CarManager.CAR_NUMBERS_KEY, carNumbers);
            tm.commit();
            log.info("Successfully imported data!");
        } catch (Exception e) {
View Full Code Here

Examples of org.jboss.as.quickstarts.datagrid.carmart.model.Car

    public void startup() {
        BasicCache<String, Object> cars = provider.getCacheContainer().getCache(CarManager.CACHE_NAME);
        List<String> carNumbers = new ArrayList<String>();

        try {
            Car c = new Car("Ford Focus", 1.6, CarType.COMBI, "white", "FML 23-25", Country.CZECH_REPUBLIC);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            c = new Car("BMW X3", 2.0, CarType.SEDAN, "gray", "1P3 2632", Country.CZECH_REPUBLIC);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            c = new Car("Ford Mondeo", 2.2, CarType.COMBI, "blue", "1B2 1111", Country.USA);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            c = new Car("Mazda MX-5", 1.8, CarType.CABRIO, "red", "6T4 2526", Country.USA);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            c = new Car("VW Golf", 1.6, CarType.HATCHBACK, "yellow", "2B2 4946", Country.GERMANY);
            carNumbers.add(c.getNumberPlate());
            cars.put(CarManager.encode(c.getNumberPlate()), c);
            // insert a list of cars' number plates
            cars.put(CarManager.CAR_NUMBERS_KEY, carNumbers);
        } catch (Exception e) {
            log.warning("An exception occured while populating the database!");
        }
View Full Code Here

Examples of org.jboss.test.aop.declare.datalayer.Car

     
   }
  
   public void createVehicles()
   {
      Car car = new Car("x", "x");
      car.save();
      FourWheeler fourWheeler = new FourWheeler("x");
      fourWheeler.save();
      Truck truck = new Truck("x");
      truck.save();
      Vehicle vehicle = new Vehicle("x");
View Full Code Here

Examples of org.jbox2d.testbed.tests.Car

public class TestList {

  public static void populateModel(TestbedModel model) {

    model.addCategory("Featured");
    model.addTest(new Car());
    model.addTest(new DominoTest());
    model.addTest(new CompoundShapes());
    model.addTest(new BlobTest4());
    model.addTest(new TheoJansen());
View Full Code Here

Examples of org.jsf2jpa.entities.Car

        return cm;
    }

    private Car createCar (String name, CarModel model)
    {
        Car car = new Car();
        car.setName(name);
        car.setModel(model);
        model.getCars().add(car);
        return car;
    }
View Full Code Here

Examples of org.mapstruct.ap.test.complex.source.Car

    }

    @Test
    public void shouldMapAttributeByName() {
        //given
        Car car = new Car(
            "Morris",
            2,
            new GregorianCalendar( 1980, 0, 1 ).getTime(),
            new Person( "Bob" ),
            new ArrayList<Person>()
        );

        //when
        CarDto carDto = CarMapper.INSTANCE.carToCarDto( car );

        //then
        assertThat( carDto ).isNotNull();
        assertThat( carDto.getMake() ).isEqualTo( car.getMake() );
    }
View Full Code Here

Examples of org.objectweb.speedo.pobjects.detach.Car

  /**
   * Test the detach method with inheritance.
   */
  public void testDetachInherited() {
    logger.log(BasicLevel.DEBUG, "***************testDetachInherited*****************");
    Car c = new Car("r5", 4, "red");
    FormulaOne f = new FormulaOne("williams", 4, "green", 262);
 
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "make persistent the car " + c.toString() +
      " and the formula one " + f.toString());
    pm.makePersistent(c);
    pm.makePersistent(f);
    pm.currentTransaction().commit();
    try {
      //detach the car c
      Car copyOfC = (Car) pm.detachCopy(c);
      assertNotNull(copyOfC);
      assertEquals(c.getName(), copyOfC.getName());
      assertEquals(c.getColor(), copyOfC.getColor());
      assertEquals(c.getNbOfWheels(), copyOfC.getNbOfWheels());
      assertEquals(c.getType(), copyOfC.getType());
      //  print the car out
      logger.log(BasicLevel.DEBUG, copyOfC.toString());
      //detach the formula one f
      FormulaOne copyOfF = (FormulaOne) pm.detachCopy(f);
      assertNotNull(copyOfF);
      assertEquals(f.getName(), copyOfF.getName());
      assertEquals(f.getColor(), copyOfF.getColor());
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.