Code Search for Developers
 
 
  

StorageBuilderTest.java from Riot in Emerald city at Krugle


Show StorageBuilderTest.java syntax highlighted

/*
 * Copyright (C) 2001-2005 Pleasant nightmare studio
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package skunkworks.computer;

import org.pleasantnightmare.riotinecity.it.Hardware;
import org.pleasantnightmare.riotinecity.it.Shell;
import org.pleasantnightmare.riotinecity.it.builders.StorageBuilder;
import org.pleasantnightmare.riotinecity.it.executables.Cat;
import org.pleasantnightmare.riotinecity.it.executables.Ls;
import org.pleasantnightmare.riotinecity.it.filetypes.ExecutableFile;
import org.pleasantnightmare.riotinecity.it.os.*;
import skunkworks.SkunkworkUtils;

/**
 * @author deus
 * @version 1.0
 * @since Mar 25, 2007 4:57:33 PM
 */
public class StorageBuilderTest {
    public static void main(String[] args) throws OperatingSystemError {
        PlayerOperatingSystem pos = new PlayerOperatingSystem();
        Hardware computer = SkunkworkUtils.createPlayerComputer(pos);

        StorageService storageService = (StorageService) pos.getService(KernelService.KS_STORAGE);
        StorageBuilder.instance().mountToStorageService(storageService, "data/test-storage.xml");
        storageService.mountToRoot(ExecutableFile.createFromExecutableClass(Ls.class));
        storageService.mountToRoot(ExecutableFile.createFromExecutableClass(Cat.class));

        UserService userService = (UserService) pos.getService(KernelService.KS_USER);
        SkunkworkUtils.addTestUsers(userService);

        User user = userService.login("izezelic", "izezelic");
        Shell s = new Shell(pos, user);
        s.run();
    }
}




See more files for this project here

Riot in Emerald city

Cyberpunk third-person 2100. noir RPG thriller using JMonkey. Its going to be mix between Bloodnet, Neuromancer, DeusEx in gameplay, with pieces of Uplink and many other mini-games for dealing with variety of tasks (lockpicking, hacking...)

Project homepage: http://sourceforge.net/projects/riot-in-ecity
Programming language(s): Java,XML
License: other

  NetworkingTest.java
  ShellTest.java
  StorageBuilderTest.java
  StorageParserTest.java
  UserBuilderTest.java