GracefulShutdown ::= SEQUENCE { timeOffline INTEGER (0..720) DEFAULT 0, delay [0] INTEGER (0..86400) DEFAULT 0, }
396397398399400401402403404405406407408409410411412413414415416
{ de.printStackTrace(); fail( de.getMessage() ); } GracefulShutdown gracefulShutdown = container.getGracefulShutdown(); assertEquals( 0, gracefulShutdown.getTimeOffline() ); assertEquals( 32768, gracefulShutdown.getDelay() ); // Check the length assertEquals( 0x07, gracefulShutdown.computeLength() ); // Check the encoding try { ByteBuffer bb1 = gracefulShutdown.encode(); String encodedPdu = Strings.dumpBytes(bb1.array()); assertEquals( encodedPdu, decodedPdu ); }
767778798081828384858687888990919293949596
{ de.printStackTrace(); fail( de.getMessage() ); } GracefulShutdown gracefulShutdown = container.getGracefulShutdown(); assertEquals( 1, gracefulShutdown.getTimeOffline() ); assertEquals( 1, gracefulShutdown.getDelay() ); // Check the length assertEquals( 0x08, gracefulShutdown.computeLength() ); // Check the encoding try { ByteBuffer bb1 = gracefulShutdown.encode(); String encodedPdu = Strings.dumpBytes(bb1.array()); assertEquals( encodedPdu, decodedPdu ); }
128129130131132133134135136137138139140141142143144145146147148
{ de.printStackTrace(); fail( de.getMessage() ); } GracefulShutdown gracefulShutdown = container.getGracefulShutdown(); assertEquals( 1, gracefulShutdown.getTimeOffline() ); assertEquals( 0, gracefulShutdown.getDelay() ); // Check the length assertEquals( 0x05, gracefulShutdown.computeLength() ); // Check the encoding try { ByteBuffer bb1 = gracefulShutdown.encode(); String encodedPdu = Strings.dumpBytes(bb1.array()); assertEquals( encodedPdu, decodedPdu ); }
181182183184185186187188189190191192193194195196197198199200201
{ de.printStackTrace(); fail( de.getMessage() ); } GracefulShutdown gracefulShutdown = container.getGracefulShutdown(); assertEquals( 0, gracefulShutdown.getTimeOffline() ); assertEquals( 1, gracefulShutdown.getDelay() ); // Check the length assertEquals( 0x05, gracefulShutdown.computeLength() ); // Check the encoding try { ByteBuffer bb1 = gracefulShutdown.encode(); String encodedPdu = Strings.dumpBytes(bb1.array()); assertEquals( encodedPdu, decodedPdu ); }
232233234235236237238239240241242243244245246247248249250251252
{ de.printStackTrace(); fail( de.getMessage() ); } GracefulShutdown gracefulShutdown = container.getGracefulShutdown(); assertEquals( 0, gracefulShutdown.getTimeOffline() ); assertEquals( 0, gracefulShutdown.getDelay() ); // Check the length assertEquals( 0x02, gracefulShutdown.computeLength() ); // Check the encoding try { ByteBuffer bb1 = gracefulShutdown.encode(); String encodedPdu = Strings.dumpBytes(bb1.array()); assertEquals( encodedPdu, decodedPdu ); }
286287288289290291292293294295296297298299300301302303304305306
{ de.printStackTrace(); fail( de.getMessage() ); } GracefulShutdown gracefulShutdown = container.getGracefulShutdown(); assertEquals( 0, gracefulShutdown.getTimeOffline() ); assertEquals( 500, gracefulShutdown.getDelay() ); // Check the length assertEquals( 0x06, gracefulShutdown.computeLength() ); // Check the encoding try { ByteBuffer bb1 = gracefulShutdown.encode(); String encodedPdu = Strings.dumpBytes(bb1.array()); assertEquals( encodedPdu, decodedPdu ); }