package com.nicewuerfel.blockown.database; import com.nicewuerfel.blockown.output.Output; import org.bukkit.World; import org.mockito.Mockito; import java.util.logging.Logger; /** * Output implementation for tests. */ public class TestOutput implements Output { @Override public void printError(String messagthrowable) { throw new AssertionError(messagthrowable); } @Override public void printError(Throwable throwable) { throw new AssertionError(throwable); } @Override public void printError(String message, Throwable throwable) { throw new AssertionError(message, throwable); } @Override public void printException(String messagthrowable) { throw new AssertionError(messagthrowable); } @Override public void printException(Throwable throwable) { throw new AssertionError(throwable); } @Override public void printException(String message, Throwable throwable) { throw new AssertionError(message, throwable); } @Override public void printConsole(String message) { if (message.equalsIgnoreCase("The cache has been dumped to the hard drive")) { throw new RuntimeException(message); } } @Override public void broadcast(String message) {} @Override public void broadcast(World world, String message) {} @Override public void debugMessage(String message) { System.out.println("Debug message: " + message); } @Override public Logger getLogger() { Logger logger = Mockito.mock(Logger.class); return logger; } }