package lc.mecha.nls;

import lc.mecha.log.MechaLogger;
import lc.mecha.log.MechaLoggerFactory;
import org.junit.Test;

import java.util.Locale;

import static org.junit.Assert.assertEquals;

public class NlsMessageBundleTest {
    private static final MechaLogger logger = MechaLoggerFactory.getLogger(NlsMessageBundleTest.class);

    @Test
    public void testNlsMessageBundle() {
        NlsMessageBundle bundle = new NlsMessageBundle();
        bundle.putMessage(new NlsMessage("TST", 5, "Sorry, eh!"), Locale.CANADA);
        NlsMessage msg = bundle.getMessage("TST", 5, Locale.CANADA);
        assertEquals("TST-00005: Sorry, eh!", msg.format(null));
    }
}
