Package org.jpos.iso

Examples of org.jpos.iso.ISOMsg


    }

    @Test
    public void testSetErrComponent() throws Throwable {
        ISOVException iSOVException = new ISOVException("testISOVExceptionDescription");
        ISOComponent c = new ISOMsg();
        iSOVException.setErrComponent(c);
        assertSame("iSOVException.errComponent", c, iSOVException.errComponent);
    }
View Full Code Here


        assertTrue("iSOVException.treated", iSOVException.treated);
    }

    @Test
    public void testTreated() throws Throwable {
        boolean result = new ISOVException("testISOVExceptionDescription", new ISOMsg("testISOVExceptionMti")).treated();
        assertFalse("result", result);
    }
View Full Code Here

  assertSame("result", m, result);
    }

    @Test
    public void testFilter1() throws Throwable {
  ISOMsg m = new ISOMsg("testStatefulFilterMti");
  m.setDirection(1);
  ISOMsg result = new StatefulFilter().filter(new NACChannel(), m,
    new LogEvent());
  assertSame("result", m, result);
    }
View Full Code Here

  int[] key = new int[0];
  StatefulFilter statefulFilter = new StatefulFilter();
  statefulFilter.setKey(key);
  ISOChannel iSOChannel = new PADChannel();
  LogEvent evt = new LogEvent("testStatefulFilterTag");
  ISOMsg m = mock(ISOMsg.class);

  given(m.getDirection()).willReturn(58);

  ISOMsg result = statefulFilter.filter(iSOChannel, m, evt);
  assertSame("result", m, result);
    }
View Full Code Here

  StatefulFilter statefulFilter = new StatefulFilter();
  statefulFilter.setKey(key);
  statefulFilter.setMatchDirection(58);
  statefulFilter.setSavedFields((int[]) null);
  statefulFilter.setIgnoredFields((int[]) null);
  ISOMsg m = new ISOMsg("testStatefulFilterMti");
  m.setDirection(58);
  ISOMsg result = statefulFilter
    .filter(new PostChannel("testStatefulFilterHost", 100,
      new XMLPackager()), m, new LogEvent(
      "testStatefulFilterTag", new CTCSubFieldPackager()));
  assertSame("result", m, result);
    }
View Full Code Here

    @Test
    public void testFilter4() throws Throwable {
  StatefulFilter statefulFilter = new StatefulFilter();
  statefulFilter.setConfiguration(new SimpleConfiguration());
  statefulFilter.setSavedFields((int[]) null);
  ISOMsg m = new ISOMsg("testStatefulFilterMti");
  m.setDirection(1);
  ISOMsg result = statefulFilter.filter(new LogChannel(), m,
    new LogEvent("testStatefulFilterTag", new Object()));
  assertSame("result", m, result);
    }
View Full Code Here

    @Test
    public void testFilter5() throws Throwable {
  StatefulFilter statefulFilter = new StatefulFilter();
  BASE24TCPChannel iSOChannel = mock(BASE24TCPChannel.class);
  LogEvent evt = mock(LogEvent.class);
  ISOMsg m = mock(ISOMsg.class);
  given(m.getString(11)).willReturn(null);
  given(m.getString(41)).willReturn(null);
  given(m.getDirection()).willReturn(0);
  ISOMsg result = statefulFilter.filter(iSOChannel, m, evt);
  assertSame("result", m, result);
    }
View Full Code Here

    public void testFilter6() throws Throwable {
  StatefulFilter statefulFilter = new StatefulFilter();
  statefulFilter.setMatchDirection(58);
  statefulFilter.setSavedFields((int[]) null);
  statefulFilter.setIgnoredFields((int[]) null);
  ISOMsg m = new ISOMsg("testStatefulFilterMti");
  m.setDirection(58);
  ISOMsg result = statefulFilter
    .filter(new PostChannel("testStatefulFilterHost", 100,
      new XMLPackager()), m, new LogEvent(
      "testStatefulFilterTag", new CTCSubFieldPackager()));
  assertEquals("result.getDirection()", 58, result.getDirection());
    }
View Full Code Here

  int[] key = new int[0];
  StatefulFilter statefulFilter = new StatefulFilter();
  statefulFilter.setKey(key);
  statefulFilter.setMatchDirection(0);
  statefulFilter.setSavedFields((int[]) null);
  ISOMsg m = new ISOMsg("testStatefulFilterMti");
  ISOMsg result = statefulFilter.filter(
    new PADChannel(new XMLPackager()), m, new LogEvent(
      new Base1SubFieldPackager(), "testStatefulFilterTag"));
  assertSame("result", m, result);
    }
View Full Code Here

  assertSame("result", m, result);
    }

    @Test
    public void testFilterThrowsNullPointerException() throws Throwable {
  ISOMsg m = new ISOMsg(100);
  m.setDirection(100);
  int[] key = new int[0];
  StatefulFilter statefulFilter = new StatefulFilter();
  statefulFilter.setKey(key);
  statefulFilter.setSpace((Space) null);
  statefulFilter.setMatchDirection(100);
View Full Code Here

TOP

Related Classes of org.jpos.iso.ISOMsg

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.