Package org.jpos.iso.channel

Examples of org.jpos.iso.channel.CSChannel


    }

    @Test
    public void testProcess1() throws Throwable {
        BSHRequestListener bSHRequestListener = new BSHRequestListener();
        boolean result = bSHRequestListener.process(new CSChannel(), new ISOMsg());
        assertFalse("result", result);
        assertNull("bSHRequestListener.whitelist", bSHRequestListener.whitelist);
    }
View Full Code Here


    @Test
    public void testFilter1() throws Throwable {
        ISOMsg m = new ISOMsg(100);
        m.merge(new ISOMsg("testMacroFilterMti"));
        m.set(1, "");
        ISOMsg result = new MacroFilter().filter(new CSChannel(new ISOBaseValidatingPackager()), m, new LogEvent(
                "testMacroFilterTag", ""));
        assertEquals("result.getDirection()", 0, result.getDirection());
    }
View Full Code Here

        ISOMsg m = new ISOMsg(100);
        byte[] value = new byte[2];
        m.set(100, value);
        m.merge(new ISOMsg("testMacroFilterMti"));
        m.set(100, "");
        ISOMsg result = new MacroFilter().filter(new CSChannel(new ISOBaseValidatingPackager()), m, new LogEvent(
                "testMacroFilterTag", ""));
        assertSame("result", m, result);
    }
View Full Code Here

    @Test
    public void testFilter6() throws Throwable {
        ISOMsg m = new ISOMsg(100);
        m.set(100, "");
        ISOMsg result = new MacroFilter().filter(new CSChannel(new ISOBaseValidatingPackager()), m, new LogEvent(
                "testMacroFilterTag", ""));
        assertEquals("result.getDirection()", 0, result.getDirection());
    }
View Full Code Here

    @Test
    public void testFilter1() throws Throwable {
        BSHFilter bSHFilter = new BSHFilter();
        Configuration cfg = new SimpleConfiguration();
        bSHFilter.setConfiguration(cfg);
        ISOChannel channel = new CSChannel();
        LogEvent evt = new LogEvent();

        ISOVMsg result = (ISOVMsg) bSHFilter.filter(channel, m, evt);
        assertSame("result", m, result);
        assertSame("bSHFilter.cfg", cfg, bSHFilter.cfg);
View Full Code Here

    @Test
    public void testFilterThrowsNullPointerException() throws Throwable {
        BSHFilter bSHFilter = new BSHFilter();
        LogEvent evt = new LogEvent();
        try {
            bSHFilter.filter(new CSChannel("testBSHFilterHost", 100, new PostPackager()), new ISOMsg("testBSHFilterMti"), evt);
            fail("Expected NullPointerException to be thrown");
        } catch (NullPointerException ex) {
            assertNull("ex.getMessage()", ex.getMessage());
            assertNull("bSHFilter.cfg", bSHFilter.cfg);
        }
View Full Code Here

  statefulFilter.setKey(key);
  statefulFilter.setSpace((Space) null);
  statefulFilter.setMatchDirection(0);
  statefulFilter.setIgnoredFields((int[]) null);
  try {
      statefulFilter.filter(new CSChannel("testStatefulFilterHost", 100,
        new PostPackager()), new ISOMsg("testStatefulFilterMti"),
        new LogEvent());
      fail("Expected NullPointerException to be thrown");
  } catch (NullPointerException ex) {
      assertNull("ex.getMessage()", ex.getMessage());
View Full Code Here

  statefulFilter.setSpace((Space) null);
  statefulFilter.setMatchDirection(0);
  statefulFilter.setSavedFields((int[]) null);
  statefulFilter.setIgnoredFields((int[]) null);
  try {
      statefulFilter.filter(new CSChannel("testStatefulFilterHost", 100,
        new PostPackager()), new ISOMsg("testStatefulFilterMti"),
        new LogEvent());
      fail("Expected NullPointerException to be thrown");
  } catch (NullPointerException ex) {
      assertNull("ex.getMessage()", ex.getMessage());
View Full Code Here

  int[] key = new int[0];
  StatefulFilter statefulFilter = new StatefulFilter();
  statefulFilter.setKey(key);
  statefulFilter.setSpace((Space) null);
  try {
      statefulFilter.filter(new CSChannel("testStatefulFilterHost", 100,
        new GenericPackager()),
        new ISOMsg("testStatefulFilterMti"), new LogEvent(
          "testStatefulFilterTag", "testString"));
      fail("Expected NullPointerException to be thrown");
  } catch (NullPointerException ex) {
View Full Code Here

  statefulFilter.setSpace((Space) null);
  statefulFilter.setMatchDirection(0);
  statefulFilter.setSavedFields((int[]) null);
  statefulFilter.setIgnoredFields((int[]) null);
  try {
      statefulFilter.filter(new CSChannel("testStatefulFilterHost", 100,
        new PostPackager()), new ISOMsg("testStatefulFilterMti"),
        new LogEvent());
      fail("Expected NullPointerException to be thrown");
  } catch (NullPointerException ex) {
      assertNull("ex.getMessage()", ex.getMessage());
View Full Code Here

TOP

Related Classes of org.jpos.iso.channel.CSChannel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.