// Path: living-documentation-workshop/src/test/java/flottio/livingdocumentation/SimpleTemplate.java
// public static String evaluate(final String template, String title, String content) {
// 	return template.replace("{0}", title).replace("{1}", content);
// }
// 
// Path: living-documentation-workshop/src/test/java/flottio/livingdocumentation/SimpleTemplate.java
// public static String readTestResource(final String filename) {
// 	String lineSep = String.format("%n");
// 	final StringBuffer buffer = new StringBuffer();
// 	try {
// 		BufferedReader in = new BufferedReader(new InputStreamReader(
// 				DummyTemplatingTest.class.getResourceAsStream(filename)));
// 		String str = null;
// 		while ((str = in.readLine()) != null) {
// 			buffer.append(lineSep);
// 			buffer.append(str);
// 		}
// 		in.close();
// 	} catch (IOException e) {
// 		e.printStackTrace();
// 	}
// 	return buffer.toString();
// }
// 
// Path: living-documentation-workshop/src/test/java/flottio/livingdocumentation/SimpleTemplate.java
// public static void write(String path, String filename, String content) throws UnsupportedEncodingException,
// 		FileNotFoundException {
// 	final String outputFileName = path + filename;
// 	final String outputEncoding = "ISO-8859-1";
// 	final FileOutputStream fos = new FileOutputStream(outputFileName);
// 	final PrintWriter w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos, outputEncoding)));
// 
// 	w.println(content);
// 	w.flush();
// 	w.close();
// }


import static flottio.livingdocumentation.SimpleTemplate.evaluate;
import static flottio.livingdocumentation.SimpleTemplate.readTestResource;
import static flottio.livingdocumentation.SimpleTemplate.write;
import java.io.FileNotFoundException;
import java.io.UnsupportedEncodingException;
import java.text.MessageFormat;
import org.junit.Ignore;
import org.junit.Test;
package flottio.livingdocumentation;




public class DummyTemplatingTest {

	@Test
	public void testMarkdownTemplate() throws UnsupportedEncodingException, FileNotFoundException {
		final String template = readTestResource("strapdown-template.html");

		String title = "Living Glossary";
		String content = "# Big Title \n ## Second title \n \n sample text goes here bla blab...";
		final String text = MessageFormat.format(template, new Object[] { title, content });
		write("", "livingglossary.html", text);
	}

	@Test
	public void testGraphvizTemplate() throws UnsupportedEncodingException, FileNotFoundException {
// Path: living-documentation-workshop/src/test/java/flottio/livingdocumentation/SimpleTemplate.java
// public static String evaluate(final String template, String title, String content) {
// 	return template.replace("{0}", title).replace("{1}", content);
// }
// 
// Path: living-documentation-workshop/src/test/java/flottio/livingdocumentation/SimpleTemplate.java
// public static String readTestResource(final String filename) {
// 	String lineSep = String.format("%n");
// 	final StringBuffer buffer = new StringBuffer();
// 	try {
// 		BufferedReader in = new BufferedReader(new InputStreamReader(
// 				DummyTemplatingTest.class.getResourceAsStream(filename)));
// 		String str = null;
// 		while ((str = in.readLine()) != null) {
// 			buffer.append(lineSep);
// 			buffer.append(str);
// 		}
// 		in.close();
// 	} catch (IOException e) {
// 		e.printStackTrace();
// 	}
// 	return buffer.toString();
// }
// 
// Path: living-documentation-workshop/src/test/java/flottio/livingdocumentation/SimpleTemplate.java
// public static void write(String path, String filename, String content) throws UnsupportedEncodingException,
// 		FileNotFoundException {
// 	final String outputFileName = path + filename;
// 	final String outputEncoding = "ISO-8859-1";
// 	final FileOutputStream fos = new FileOutputStream(outputFileName);
// 	final PrintWriter w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos, outputEncoding)));
// 
// 	w.println(content);
// 	w.flush();
// 	w.close();
// }


// Path: living-documentation-workshop/src/test/java/flottio/livingdocumentation/DummyTemplatingTest.java
import static flottio.livingdocumentation.SimpleTemplate.evaluate;
import static flottio.livingdocumentation.SimpleTemplate.readTestResource;
import static flottio.livingdocumentation.SimpleTemplate.write;
import java.io.FileNotFoundException;
import java.io.UnsupportedEncodingException;
import java.text.MessageFormat;
import org.junit.Ignore;
import org.junit.Test;

package flottio.livingdocumentation;




public class DummyTemplatingTest {

	@Test
	public void testMarkdownTemplate() throws UnsupportedEncodingException, FileNotFoundException {
		final String template = readTestResource("strapdown-template.html");

		String title = "Living Glossary";
		String content = "# Big Title \n ## Second title \n \n sample text goes here bla blab...";
		final String text = MessageFormat.format(template, new Object[] { title, content });
		write("", "livingglossary.html", text);
	}

	@Test
	public void testGraphvizTemplate() throws UnsupportedEncodingException, FileNotFoundException {
		final String template = readTestResource("viz-template.html");