Search in sources :

Example 1 with FakeFileSystem

use of limelight.io.FakeFileSystem in project limelight by slagyr.

the class CreateCommandTest method setUp.

@Before
public void setUp() throws Exception {
    System.setProperty("limelight.home", "home");
    Context.removeInstance();
    output = new ByteArrayOutputStream();
    Command.setOutput(new PrintStream(output));
    fs = new FakeFileSystem();
    command = new CreateCommand();
    command.setTemplaterLoger(new NullTemplaterLogger());
    Context.instance().fs = fs;
}
Also used : PrintStream(java.io.PrintStream) FakeFileSystem(limelight.io.FakeFileSystem) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Before(org.junit.Before)

Example 2 with FakeFileSystem

use of limelight.io.FakeFileSystem in project limelight by slagyr.

the class BootTest method configuringFileSystem.

@Test
public void configuringFileSystem() throws Exception {
    FileSystem fs = new FakeFileSystem();
    Boot.configureContext(Boot.defaultOptions.merge("file-system", fs), context);
    assertSame(fs, Context.fs());
}
Also used : FakeFileSystem(limelight.io.FakeFileSystem) FakeFileSystem(limelight.io.FakeFileSystem) FileSystem(limelight.io.FileSystem)

Example 3 with FakeFileSystem

use of limelight.io.FakeFileSystem in project limelight by slagyr.

the class JavaPlayerTest method setUp.

@Before
public void setUp() throws Exception {
    FakeFileSystem fs = FakeFileSystem.installed();
    JavaProductionTest.writeSamplePlayerTo(fs.outputStream("/testProduction/classes/SamplePlayer.class"));
    samplePlayerClass = new PlayerClassLoader("/testProduction/classes").loadClass("SamplePlayer");
    prop = new PropPanel(new FakePropProxy());
    new FakeScene().add(prop);
}
Also used : FakeFileSystem(limelight.io.FakeFileSystem) PropPanel(limelight.ui.model.PropPanel) FakeScene(limelight.ui.model.FakeScene) FakePropProxy(limelight.model.api.FakePropProxy) Before(org.junit.Before)

Aggregations

FakeFileSystem (limelight.io.FakeFileSystem)3 Before (org.junit.Before)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 PrintStream (java.io.PrintStream)1 FileSystem (limelight.io.FileSystem)1 FakePropProxy (limelight.model.api.FakePropProxy)1 FakeScene (limelight.ui.model.FakeScene)1 PropPanel (limelight.ui.model.PropPanel)1