X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftemplate%2FFilesystemTemplateTest.java;h=9259ef555a90cddee9a10eac67d76e3674243756;hb=a57dae72e505fec934a9516b88fea75c473f7641;hp=cd989eb04593f3b669e48f6638c20ead22cb82be;hpb=2f21e4a2402f1c7a55175f223118521dbd2d27d8;p=Sone.git
diff --git a/src/test/java/net/pterodactylus/sone/template/FilesystemTemplateTest.java b/src/test/java/net/pterodactylus/sone/template/FilesystemTemplateTest.java
index cd989eb..9259ef5 100644
--- a/src/test/java/net/pterodactylus/sone/template/FilesystemTemplateTest.java
+++ b/src/test/java/net/pterodactylus/sone/template/FilesystemTemplateTest.java
@@ -2,6 +2,7 @@ package net.pterodactylus.sone.template;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.notNullValue;
import java.io.File;
import java.io.IOException;
@@ -21,14 +22,12 @@ import org.junit.Test;
/**
* Unit test for {@link FilesystemTemplate}.
- *
- * @author David âBombeâ Roden
*/
public class FilesystemTemplateTest {
private final File tempFile;
private final FilesystemTemplate filesystemTemplate;
- private final AtomicReference stringWriter = new AtomicReference(new StringWriter());
+ private final AtomicReference stringWriter = new AtomicReference<>(new StringWriter());
private final TemplateContext templateContext = new TemplateContext();
public FilesystemTemplateTest() throws IOException {
@@ -108,4 +107,19 @@ public class FilesystemTemplateTest {
assertThat(getRenderedString(), is("New.a1.Test"));
}
+ @Test
+ public void columnOfReturnedTemplateIsReturnedAsZero() {
+ assertThat(filesystemTemplate.getColumn(), is(0));
+ }
+
+ @Test
+ public void lineOfReturnedTemplateIsReturnedAsZero() {
+ assertThat(filesystemTemplate.getLine(), is(0));
+ }
+
+ @Test
+ public void templateCanBeIteratedOver() {
+ assertThat(filesystemTemplate.iterator(), notNullValue());
+ }
+
}