@Test public void testInGateway2() { DirectFieldAccessor dfa = new DirectFieldAccessor(tcpInboundGateway2); assertSame(cfS3, dfa.getPropertyValue("serverConnectionFactory")); assertEquals(456L, dfa.getPropertyValue("replyTimeout")); assertEquals("inGateway2", tcpInboundGateway2.getComponentName()); assertEquals("ip:tcp-inbound-gateway", tcpInboundGateway2.getComponentType()); assertNull(dfa.getPropertyValue("errorChannel")); assertEquals(Boolean.FALSE, dfa.getPropertyValue("isClientMode")); assertNull(dfa.getPropertyValue("taskScheduler")); assertEquals(60000L, dfa.getPropertyValue("retryInterval")); }
@Test public void testInGateway1() { DirectFieldAccessor dfa = new DirectFieldAccessor(tcpInboundGateway1); assertSame(cfS2, dfa.getPropertyValue("serverConnectionFactory")); assertEquals(456L, dfa.getPropertyValue("replyTimeout")); assertEquals("inGateway1", tcpInboundGateway1.getComponentName()); assertEquals("ip:tcp-inbound-gateway", tcpInboundGateway1.getComponentType()); assertEquals(errorChannel, dfa.getPropertyValue("errorChannel")); assertTrue(cfS2.isLookupHost()); assertFalse(tcpInboundGateway1.isAutoStartup()); assertEquals(126, tcpInboundGateway1.getPhase()); assertFalse( (Boolean) TestUtils.getPropertyValue( TestUtils.getPropertyValue(cfS2, "mapper"), "applySequence")); assertEquals(100L, TestUtils.getPropertyValue(cfS2, "readDelay")); }