public class MockMessageCatalogContext extends Object implements MessageCatalogFactory.Context
MessageCatalogFactory.Context
for testing. Throws exceptions on any warning or error
message, and writes any output to the supplied ByteArrayOutputStream
.Constructor and Description |
---|
MockMessageCatalogContext(ByteArrayOutputStream baos) |
Modifier and Type | Method and Description |
---|---|
OutputStream |
createBinaryFile(String catalogName) |
PrintWriter |
createTextFile(String catalogName,
String charSet) |
void |
error(String msg) |
void |
error(String msg,
Throwable cause) |
GwtLocaleFactory |
getLocaleFactory() |
void |
warning(String msg) |
void |
warning(String msg,
Throwable cause) |
public MockMessageCatalogContext(ByteArrayOutputStream baos)
public OutputStream createBinaryFile(String catalogName)
createBinaryFile
in interface MessageCatalogFactory.Context
public PrintWriter createTextFile(String catalogName, String charSet)
createTextFile
in interface MessageCatalogFactory.Context
public void error(String msg)
error
in interface MessageCatalogFactory.Context
public void error(String msg, Throwable cause)
error
in interface MessageCatalogFactory.Context
public GwtLocaleFactory getLocaleFactory()
getLocaleFactory
in interface MessageCatalogFactory.Context
public void warning(String msg)
warning
in interface MessageCatalogFactory.Context
public void warning(String msg, Throwable cause)
warning
in interface MessageCatalogFactory.Context
Copyright © 2018. All rights reserved.