Search in sources :

Example 46 with NceMessage

use of jmri.jmrix.nce.NceMessage in project JMRI by JMRI.

the class NceMonPanelTest method testMsg.

@Test
@Ignore("see comments below for corrections required.")
public void testMsg() {
    // Prior to JUnit4 conversion, this test method was commented out with a note reading
    // Following are timing-specific, occasionally fail, so commented out
    NceMessage m = new NceMessage(3);
    m.setBinary(false);
    m.setOpCode('L');
    m.setElement(1, '0');
    m.setElement(2, 'A');
    ((NceMonPanel) pane).message(m);
// The following assertions need to be re-written.  There is no
// current method for retrieving the text panel from the NceMonPanel.
//Assert.assertEquals("length ", "cmd: \"L0A\"\n".length(), ((NceMonPanel)pane).getPanelText().length()); 
//Assert.assertEquals("display", "cmd: \"L0A\"\n", ((NceMonPanel)pane).getPanelText()); 
}
Also used : NceMessage(jmri.jmrix.nce.NceMessage) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

NceMessage (jmri.jmrix.nce.NceMessage)46 IOException (java.io.IOException)3 BufferedReader (java.io.BufferedReader)2 File (java.io.File)2 FileNotFoundException (java.io.FileNotFoundException)2 FileReader (java.io.FileReader)2 JFileChooser (javax.swing.JFileChooser)2 JPanel (javax.swing.JPanel)2 NceReply (jmri.jmrix.nce.NceReply)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1