Package com.tobedevoured.modelcitizen.model

Examples of com.tobedevoured.modelcitizen.model.Driver


        modelFactory.registerBlueprint(driverBlueprint);
    }

    @Test
    public void testDriverNameIsForced() throws CreateModelException {
        Driver driver = new Driver();
        driver.setName("Test Name");
        driver = modelFactory.createModel(Driver.class);

        assertEquals("Driver name is a forced default", "Lev the Driver", driver.getName());
    }
View Full Code Here


        Car car1 = modelFactory.createModel(Car.class);
        Car car2 = modelFactory.createModel(Car.class);
        Car car3 = modelFactory.createModel(Car.class);

        Driver driver = car1.getDriver();

        assertEquals(car2.getDriver(), driver);
        assertEquals(car3.getDriver(), driver);
    }
View Full Code Here

        assertEquals(car3.getDriver(), driver);
    }

    @Test
    public void singletonPolicyWithModel() throws ModelFactoryException {
        Driver driver = modelFactory.createModel(Driver.class);
        modelFactory.addPolicy(new MappedSingletonPolicy(driver));

        Car car1 = modelFactory.createModel(Car.class);
        Car car2 = modelFactory.createModel(Car.class);
        Car car3 = modelFactory.createModel(Car.class);
View Full Code Here

TOP

Related Classes of com.tobedevoured.modelcitizen.model.Driver

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.