@Test public void testCopy() { TransExecutionConfiguration tec = new TransExecutionConfiguration(); tec.setPassedBatchId( null ); //CHECKSTYLE IGNORE AvoidNestedBlocks FOR NEXT 3 LINES { TransExecutionConfiguration tecCopy = (TransExecutionConfiguration) tec.clone(); assertEquals( "clone-copy", tec.getPassedBatchId(), tecCopy.getPassedBatchId() ); } tec.setPassedBatchId( 0L ); //CHECKSTYLE IGNORE AvoidNestedBlocks FOR NEXT 3 LINES { TransExecutionConfiguration tecCopy = (TransExecutionConfiguration) tec.clone(); assertEquals( "clone-copy", tec.getPassedBatchId(), tecCopy.getPassedBatchId() ); } tec.setPassedBatchId( 5L ); //CHECKSTYLE IGNORE AvoidNestedBlocks FOR NEXT 3 LINES { TransExecutionConfiguration tecCopy = (TransExecutionConfiguration) tec.clone(); assertEquals( "clone-copy", tec.getPassedBatchId(), tecCopy.getPassedBatchId() ); } }
@Test public void testDefaultPassedBatchId() { TransExecutionConfiguration tec = new TransExecutionConfiguration(); assertEquals( "default passedBatchId value must be null", null, tec.getPassedBatchId() ); }
Node node = XMLHandler.getSubNode( doc, TransExecutionConfiguration.XML_TAG ); TransExecutionConfiguration tecCopy = new TransExecutionConfiguration( node ); assertEquals( "xml-copy", tec.getPassedBatchId(), tecCopy.getPassedBatchId() ); Node node = XMLHandler.getSubNode( doc, TransExecutionConfiguration.XML_TAG ); TransExecutionConfiguration tecCopy = new TransExecutionConfiguration( node ); assertEquals( "xml-copy", tec.getPassedBatchId(), tecCopy.getPassedBatchId() ); Node node = XMLHandler.getSubNode( doc, TransExecutionConfiguration.XML_TAG ); TransExecutionConfiguration tecCopy = new TransExecutionConfiguration( node ); assertEquals( "xml-copy", tec.getPassedBatchId(), tecCopy.getPassedBatchId() );
final Long passedBatchId = transExecutionConfiguration.getPassedBatchId(); if ( passedBatchId != null ) { trans.setPassedBatchId( passedBatchId );