package com.marcobehler.saito.core.files;

import com.marcobehler.saito.core.BaseInMemoryFSTest;
import org.junit.Test;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

import static org.assertj.core.api.Assertions.assertThat;

/**
 * @author Marco Behler <marco@marcobehler.com>
 */
public class OtherTest extends BaseInMemoryFSTest {

    @Test
    public void saitoFile_getDataAsString() throws IOException {
        Path image = Files.write(fs.getPath("/test.jpeg"), "myContent".getBytes());

        Other other = new Other(image.getParent(), image.getFileName());
        Path targetDirectory = fs.getPath("/dest");
        Files.createDirectories(targetDirectory);
        other.process(null, targetDirectory);

        assertThat(Files.exists(fs.getPath("/dest/test.jpeg")));
    }
}

@@ -90,16 +90,138 @@
 FSTest;%0A
+import com.marcobehler.saito.core.configuration.SaitoConfig;%0Aimport com.marcobehler.saito.core.rendering.RenderingModel;%0A%0A
 import o
@@ -377,16 +377,56 @@
 ertThat;
+%0Aimport static org.mockito.Mockito.mock;
 %0A%0A/**%0A *
@@ -890,11 +890,50 @@
 ss(n
-ull
+ew RenderingModel(mock(SaitoConfig.class))
 , ta

work on freemarker