GracefulShutdown ::= SEQUENCE { timeOffline INTEGER (0..720) DEFAULT 0, delay [0] INTEGER (0..86400) DEFAULT 0, }
81828384858687888990919293949596979899100101
{ 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 ); }
135136137138139140141142143144145146147148149150151152153154155
{ 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 ); }
190191192193194195196197198199200201202203204205206207208209210
{ 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 ); }
241242243244245246247248249250251252253254255256257258259260261
{ 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 ); }
298299300301302303304305306307308309310311312313314315316317318
{ 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 ); }
355356357358359360361362363364365366367368369370371372373374375
{ de.printStackTrace(); fail( de.getMessage() ); } GracefulShutdown gracefulShutdown = container.getGracefulShutdown(); assertEquals( 0, gracefulShutdown.getTimeOffline() ); assertEquals( 32767, 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 ); }
415416417418419420421422423424425426427428429430431432433434435
{ 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 ); }