Examples of Environment


Examples of io.dropwizard.setup.Environment

public class DBIExceptionsBundleTest {

    @Test
    public void test() {
        Environment environment = mock(Environment.class);
        JerseyEnvironment jerseyEnvironment = mock(JerseyEnvironment.class);
        when(environment.jersey()).thenReturn(jerseyEnvironment);

        new DBIExceptionsBundle().run(environment);

        verify(jerseyEnvironment, times(1)).register(isA(LoggingSQLExceptionMapper.class));
        verify(jerseyEnvironment, times(1)).register(isA(LoggingDBIExceptionMapper.class));
View Full Code Here

Examples of ise.mace.environment.Environment

    presageConfig.setAutorun(true);
    presageConfig.setEnvironmentClass(Environment.class);

    EnvironmentDataModel envDataModel = new EnvironmentDataModel
        (comment, foods, groups, foodConsumedPerAdvice);
    Environment environment = new Environment
        (randomSeed, envDataModel, BasicFreeAgentGroup.class);

    NameGenerator.setRandomiser(new Random(randomSeed));
    foods();
    agents();
View Full Code Here

Examples of it.freedomotic.model.environment.Environment

        timer.scheduleRepeating(refreshRate);
        //draw();
    }

    public void init() {
        Environment env = EnvironmentsController.getInstance().getEnvironments().get(0);
        GWT.log("Zone id: " + id);

        for (Zone z : env.getZones()) {
            if (z.getName().equals(id)) {
                GWT.log("Found!");
                // draw zone
                dr = new DrawableRoom(z);
                //    GWT.log("index: "+((Integer)dr.getIndexColor()).toString());
View Full Code Here

Examples of kiss.lang.Environment

public class EnvironmentTests {

  @Test public void testDef() {
    Expression x=Def.create(Symbol.intern("foo"),Constant.create(1));
    Environment e=Environment.EMPTY;
   
    Environment e2=x.compute(e);
    assertEquals(1,e2.get(Symbol.intern("foo")));
    assertEquals(1,e2.getResult());
  }
View Full Code Here

Examples of model.Environment

                    int diff = team0PlayerNum - team1PlayerNum;
                    for (int i = 0; i < diff; i++) {
                        int playerPosition = map.removeLastOnePlayerFromTeamN(0);

                        //Remove the environment in row: 0, position: playerPosition of the current world.
                        Environment removedEnv = client.getServer().removeAnEnvFromWorld(pvpWorld.getID(), Constants.GAME_TYPE_PVP, 0, playerPosition);

                        EnvironmentDAO.deleteEnvironmentByID(removedEnv.getID());
                        AvatarDAO.deleteAvatarByID(client.getAvatar().getID());
                    }
                } else if (team1PlayerNum > team0PlayerNum) {
                    int diff = team1PlayerNum - team0PlayerNum;
                    for (int i = 0; i < diff; i++) {
                        int playerPosition = map.removeLastOnePlayerFromTeamN(1);

                        //Remove the environment in row: 0, position: playerPosition of the current world.
                        Environment removedEnv = client.getServer().removeAnEnvFromWorld(pvpWorld.getID(), Constants.GAME_TYPE_PVP, 0, playerPosition);

                        EnvironmentDAO.deleteEnvironmentByID(removedEnv.getID());
                        AvatarDAO.deleteAvatarByID(client.getAvatar().getID());
                    }
                }
            } else {
                System.out.println("PvP world map is null");
View Full Code Here

Examples of net.celisdelafuente.java.Acacia.util.Environment

public class StartServer {
 
  public static void main(String[] args) throws Exception {
   
    Environment env = new Environment();
    env.configure();
   
    String jetty_home = System.getProperty("jetty.home", "..");
   
    Server server = new Server(env.getTcpport());
   
    WebAppContext webapp = new WebAppContext();
        webapp.setContextPath(env.getAppContextPath());
        webapp.setWar(env.getWarFile());
        server.setHandler(webapp);
         
    server.start();
    server.join();
  }
View Full Code Here

Examples of net.csdn.common.env.Environment

    private Logger createLogger(String name) {
        Logger logger = Logger.getLogger(name);
        Layout layout = new PatternLayout("%m%n");
        Appender appender = null;
        try {
            Environment environment = new Environment(settings);
            appender = new DailyRollingFileAppender(layout, environment.logsFile().getPath() + "/" + name + "/" + name, "'.'yyyy-MM-dd");
        } catch (IOException e) {
            e.printStackTrace();
        }
        logger.addAppender(appender);
        return logger;
View Full Code Here

Examples of net.hasor.core.Environment

* @author 赵永春 (zyc@byshell.org)
*/
@Plugin
public class ListenerPlugin implements Module  {
    public void loadModule(ApiBinder apiBinder) throws Throwable {
        final Environment env = apiBinder.getEnvironment();
        final Set<Class<?>> eventSet = env.findClass(Listener.class);
        if (eventSet == null || eventSet.isEmpty())
            return;
        for (final Class<?> eventClass : eventSet) {
            /*排除没有实现 EventListener 接口的类。*/
            if (EventListener.class.isAssignableFrom(eventClass) == false) {
View Full Code Here

Examples of net.myexperiments.viciouscycle.view.Environment

    for (int i = 0; i < roomSolids.length; i++) {
      for (int j = 0; j < roomSolids[0].length; j++) {
        roomSolids[i][j] = (room2[i][j] != 19);
      }
    }
    env = new Environment(SlashemNameGenerator.getCmapTiles(), room2,
        roomSolids, SlashemNameGenerator.get("cmap.floor of a room"),
        blank, SlashemNameGenerator.get("system.tile.highlight"),
        SlashemNameGenerator.get("system.tile.front"),
        SlashemNameGenerator.get("system.tile.back"), bsInput);
    Point displacement = new Point();
View Full Code Here

Examples of oracle.adf.share.Environment

    private String resolveExpression(final String expression) {
        if (!ADFContext.hasCurrent()) { // No context available, we are prob. in the design mode of JDev.
            return null;
        }
        ADFContext adfCtxt = ADFContext.getCurrent();
        Environment env = adfCtxt.getEnvironment();
        Object ctxt = env == null ? null : env.getContext();
        if (ctxt instanceof ServletContext) {
            ServletContext sCtxt = (ServletContext) ctxt;
            return sCtxt.getInitParameter(expression);
        }
        return null;
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.