input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public void test client login servlet throws exception url url new url base url elbatest client login servlet access url url | access the http localhost elba test client login servlet |
public void test secure servlet throws exception url url new url base url elbatest restricted secure servlet access url url | access the http localhost elba test restricted secure servlet |
public void test secure servlet and unsecure access throws exception get log info test secure servlet and unsecure access url url new url base url elbatest restricted secure servlet get log info accessing secure servlet with valid login access url url string base url2 http localhost integer get integer web port 8080 url url2 new url base url2 elbatest restricted unsecure ejbservlet get log info accessing secure servlet with no login access url url2 true | access the http localhost elba test restricted secure servlet |
public void test secure servlet with bad pass throws exception string base url http jduke badpass localhost integer get integer web port 8080 url url new url base url elbatest restricted secure servlet access url url true | access the http localhost elba test restricted secure servlet |
public void test secure servlet with no login throws exception string base url http localhost integer get integer web port 8080 url url new url base url elbatest restricted secure servlet access url url true | access the http localhost elba test restricted secure servlet |
public void test not elba test throws exception string base url http localhost integer get integer web port 8080 url url new url base url elbatest not unrestricted secure servlet access url url false | access the http localhost elba test not unrestricted secure servlet |
public void test secure ejbaccess throws exception url url new url base url elbatest restricted secure ejbaccess access url url | access the http localhost elba test restricted secure ejbaccess |
public void test include ejb throws exception url url new url base url elbatest restricted include ejb jsp access url url | access the http localhost elba test restricted include ejb |
public void test unsecure ejbaccess throws exception url url new url base url elbatest unsecure ejbaccess access url url true | access the http localhost elba test restricted secure ejbaccess |
public void test not elba test2 throws exception try deploy elbatest web2 ear string base url http localhost integer get integer web port 8080 url url new url base url elbatest not2 unrestricted secure servlet access url url false finally undeploy elbatest web2 ear end of try finally | deploy a second ear that include a not elba test web |
public void use test data throws exception class loader cl thread current thread get context class loader log info use test data class loader cl class c0 data0 get class log info test data 0 protection domain c0 get protection domain class c1 class for name org elba test elbamx implementation server support test data false cl log info test data 1 protection domain c1 get protection domain if c1 is instance data0 false log error assertion failed data0 is not compatible with c1 throw new illegal state exception data0 is not compatible with c1 | an operation that load the test data class using the current thread |
public void test duplicate class throws exception server invoke test object name test duplicate class args sig | test the unified loader repository for class circularity error |
public void test class loading mbean throws exception try deploy concurrentloader sar object name test object name new object name elba test name concurrent loader boolean is registered get server is registered test object name assert true elba test name concurrent loader is registered is registered integer state integer get server get attribute test object name state assert true state int value service mbean started state int value service mbean started finally undeploy concurrentloader sar end of try finally | test the unified loader repository for multi threaded class loading |
public void test interrupted threads throws exception try deploy interrupt sar object name test object name new object name elba test name interrupt test boolean is registered get server is registered test object name assert true elba test name interrupt test is registered is registered integer state integer get server get attribute test object name state assert true state int value service mbean started state int value service mbean started finally undeploy interrupt sar end of try finally | test the unified loader repository being accessed by thread with an |
public void test war overrides throws exception get log debug test war overrides try deploy log4j113 war url log4j servlet url new url http localhost 8080 log4j113 log4j servlet object reply log4j servlet url get content get log debug accessed http localhost 8080 log4j113 log4j servlet catch exception e get log info failed to access log4j servlet in log4j113 war e throw e finally undeploy log4j113 war | test the ability to override the server classes with war local versions |
public void test ejb overrides throws exception get log debug test ejb overrides try deploy log4j113 ejb jar initial context ctx new initial context stateless session home home stateless session home ctx lookup log4j113 stateless bean stateless session bean home create throwable error bean check version get log debug stateless session check version returned error assert true check version returned null error null catch exception e get log info failed to access log4j113 stateless bean in log4j113 ejb jar e throw e finally undeploy log4j113 ejb jar | test the ability to override the server classes with ejb local versions |
public void run int size classes size class the classes new class size classes to array the classes the log info new instance task creating size instances for int c 0 c the classes length c try class clazz the classes c object obj clazz new instance the log debug created instance obj catch throwable t t print stack trace | create an instance of a class and exit |
public void fail exception e if e instanceof javax jms jmsexception jmsexception exception jmsexception e string message e to string exception linked exception exception get linked exception if linked exception null message linked exception linked exception super fail message else super fail e get message | fails a test with an exception which will be used for a message |
protected void tear down try publisher connection close subscriber connection close admin delete topic connection factory tcf name admin delete topic topic name ctx close catch exception e xxx e print stack trace finally publisher topic null publisher null publisher tcf null publisher session null publisher connection null subscriber topic null subscriber null subscriber tcf null subscriber session null subscriber connection null | close connections and delete administrated objects |
private void stop monitor service try server invoke monitor name stop new object 0 new string 0 server remove notification listener monitor name this server unregister mbean observed object server unregister mbean monitor name mbean server factory release mbean server server catch exception ignored | remove everything used by this test |
protected void tear down try sender connection close receiver connection close admin delete queue connection factory qcf name admin delete queue queue name ctx close catch exception e xxx e print stack trace finally sender queue null sender null sender qcf null sender session null sender connection null receiver queue null receiver null receiver qcf null receiver session null receiver connection null | close connections and delete administrated objects |
public void test message sent when connection closed try sender connection stop message message sender session create text message sender send message message m receiver receive catch jmsexception e fail e | test that a code message producer code can send messages while a |
public void test close closed connection try sender connection is already started we close it once sender connection close we close it a second time sender connection close catch exception e fail 4 3 5 closing a closed connection must not throw an exception n | test that closing a closed connectiondoes not throw an exception |
public void test start started connection try sender connection is already started start it again should be ignored sender connection start catch jmsexception e fail e | test that starting a started connection is ignored |
public void test stop stopped connection try sender connection is started we stop it once sender connection stop stopping it a second time is ignored sender connection stop catch jmsexception e fail e | test that stopping a stopped connection is ignored |
public void start test test t last test start system current time millis current test doc create element testcase current test set attribute attr name t to string current test set attribute attr time timeout 1000 0 root element append child current test runs errors had error false mark this test as a timeout and write the result file internal format error error t new internal error test timeout current suite set counts runs failures errors long elapsed last test start start time timeout current suite set run time elapsed end test suite current suite | interface test listener |
public void test null try receiver receiver session create receiver receiver queue prop name is null receiver receiver session create receiver receiver queue prop name is not null catch jmsexception e fail e | test syntax of em identifier em is not null |
public void test unsubscribe try subscriber subscriber session create durable subscriber subscriber topic topic subscriber close nothing should happen when unsubscribing the durable subscriber subscriber session unsubscribe topic catch jmsexception e fail e | test the unsubscription of a durable subscriber |
public void test greater than try receiver connection stop receiver receiver session create receiver receiver queue weight 2500 receiver connection start text message dummy message sender session create text message dummy message set long property weight 1000 dummy message set text test greater than 1 sender send dummy message text message message sender session create text message message set long property weight 3000 message set text test greater than 2 sender send message text message msg text message receiver receive assert equals test greater than 2 msg get text catch jmsexception e fail e | test the condition in message selector |
public void end test test t errors if had error false root element remove child current test current test doc create element testcase current test set attribute attr name t to string root element append child current test long elapsed system current time millis last test start current test set attribute attr time elapsed 1000 0 | interface test listener |
public void test rollback non transacted session try sender session has been created as non transacted in the set up method assert equals false sender session get transacted sender session rollback fail should raise an illegal state exception the session is not transacted n catch javax jms illegal state exception e catch java lang illegal state exception e fail should raise a javax jms illegal state exception not a java lang illegal state exception n catch exception e fail should raise a javax jms illegal state exception not a e | test that an attempt to call the code roolback code method on a |
public void test default delivery mode assert equals the delivery mode is persistent by default n delivery mode persistent message default delivery mode | test that the code default delivery mode code of code javax |
public void test default priority assert equals the default priority is 4 n 4 message default priority | test that the code default priority code of code javax |
public void test stream message 1 try stream message message sender session create stream message sender send message message msg receiver receive assert true the message should be an instance of stream message n msg instanceof stream message catch jmsexception e fail e | send a code stream message code with an empty body |
public void test exact numeric literal try receiver receiver session create receiver receiver queue average 62 receiver receiver session create receiver receiver queue max 957 receiver receiver session create receiver receiver queue max 57 catch jmsexception e fail e | test diffent syntax for exact numeric literal 62 957 57 |
public void test equals try receiver connection stop receiver receiver session create receiver receiver queue weight 2500 receiver connection start text message dummy message sender session create text message dummy message set long property weight 1000 dummy message set text test equals 1 sender send dummy message text message message sender session create text message message set long property weight 2500 message set text test equals 2 sender send message text message msg text message receiver receive assert equals test equals 2 msg get text catch jmsexception e fail e | test the condition in message selector |
public void test commit non transacted session try sender session has been created as non transacted in the set up method assert equals false sender session get transacted sender session commit fail should raise an illegal state exception the session is not transacted n catch javax jms illegal state exception e catch java lang illegal state exception e fail should raise a javax jms illegal state exception not a java lang illegal state exception n catch exception e fail should raise a javax jms illegal state exception not a e | test that an attempt to call the code commit code method on a |
public void add failure test test throwable t failures format error failure test t | interface test listener for junit lt 3 |
public void test clear body 2 try text message message sender session create text message message set string property prop foo message clear body assert equals 3 11 1 clearing a message s body does not clear its property entries n foo message get string property prop catch jmsexception e fail e | test that the code text message |
public void test jmspriority 2 try message message sender session create message sender send message sender set priority 9 sender send message assert equals 3 4 9 after completion of the send it holds the value specified by the method sending the message n 9 message get jmspriority message msg receiver receive catch jmsexception e fail e | test that the code message producer |
public void test clear body 1 try text message message sender session create text message message set text bar message clear body assert equals 3 11 1 the clear body method of message resets the value of the message body to the empty initial message value as set by the message type s create method provided by session n null message get text catch jmsexception e fail e | test that the code text message |
public void test string try receiver receiver session create receiver receiver queue string literal receiver receiver session create receiver receiver queue string literal s catch jmsexception e fail e | test diffent syntax for string literal literal and literals |
public void test map message conversion try map message message sender session create map message message set double pi 3 14159 sender send message message m receiver receive assert true the message should be an instance of map message n m instanceof map message map message msg map message m assert true msg get object pi instanceof double assert equals 3 14159 double msg get object pi double value 0 assert equals 3 14159 msg get double pi 0 catch jmsexception e fail e | test in map message the conversion between code get object foo code and |
public void test write on received body try text message message sender session create text message message set text foo sender send message message m receiver receive assert true the message should be an instance of text message n m instanceof text message text message msg text message m msg set text bar fail should raise a message not writeable exception 3 11 2 catch message not writeable exception e catch jmsexception e fail e | test that a call to the code text message |
public void test jmspriority 1 try message message sender session create message message set jmspriority 0 sender send message assert true 3 4 9 when a message is sent this value is ignored n message get jmspriority 0 assert equals 3 4 9 after completion of the send it holds the value specified by the method sending the message n message default priority message get jmspriority message msg receiver receive catch jmsexception e fail e | test that the priority set by code message |
public void test set object property 2 try message message sender session create message message set object property prop new vector fail 3 5 5 an attempt to use any other class than boolean byte string must throw a jms message format exception n catch message format exception e catch jmsexception e fail should throw a javax jms message format exception not a e | test that any other class than code boolean byte short integer long |
public void testget map names try map message message sender session create map message enumeration e message get map names assert true no map yet defined n e has more elements message set double pi 3 14159 e message get map names assert equals pi string e next element catch jmsexception e fail e | test that the code map message |
public void test get object property try message message sender session create message assert equals 3 5 5 a null value is returned by the get object property method if a property by the specified name does not exits n null message get object property prop catch jmsexception e fail e | test that a code null code value is returned by the code message |
public void test jmsmessage id 1 try message message sender session create message message set jmsmessage id id foo sender send message assert true 3 4 3 when a message is sent this value is ignored n message get jmsmessage id id foo message msg receiver receive catch jmsexception e fail e | test that the code jmsmessage id code header field value is |
public void test map message 1 try map message message sender session create map message sender send message message msg receiver receive assert true the message should be an instance of map message n msg instanceof map message catch jmsexception e fail e | send a code map message code with an empty body |
public void test get string property try message message sender session create message assert equals 3 5 5 a null value is returned by the get string property method if a property by the specified name does not exits n null message get string property prop catch jmsexception e fail e | test that a code null code value is returned by the code message |
public void test string2 string try message message sender session create message message set string property pi 3 14159 assert equals 3 14159 message get string property pi catch jmsexception e fail e | if a property is set as a code java |
public void connect throws ioexception if connected return if file exists throw new file not found exception file get path connected true | checks if the underlying file for this connection exists |
public void test close closed session try sender session is already started we close it once sender session close we close it a second time sender session close catch exception e fail 4 4 1 closing a closed session must not throw an exception n | test that closing a closed session does strong not strong throw |
public string get header field final string name string header field null if name equals ignore case last modified header field string value of get last modified else if name equals ignore case content length header field string value of file length else if name equals ignore case content type header field get file name map get content type for file get name else if name equals ignore case date header field string value of file last modified else this always returns null currently header field super get header field name return header field | provides support for returning the value for the |
public permission get permission throws ioexception return new file permission file get path read write | return a permission for both read write since both |
public urllister create urllister url url throws malformed urlexception return create urllister url get protocol | create a url lister using the protocol from the url |
public void test object message 1 try object message message sender session create object message sender send message message msg receiver receive assert true the message should be an instance of object message n msg instanceof object message catch jmsexception e fail e | send a code object message code with an empty body |
public urllister create urllister string protocol throws malformed urlexception try string class name string classes get protocol if class name null throw new malformed urlexception no lister class defined for protocol protocol class clazz thread current thread get context class loader load class class name return urllister clazz new instance catch class not found exception e throw new malformed urlexception e get message catch instantiation exception e throw new malformed urlexception e get message catch illegal access exception e throw new malformed urlexception e get message | create a url lister for the supplied protocol |
public void register listener string protocol string class name classes put protocol class name | register a urllister class for a given protocol |
public void test string2 double 2 try message message sender session create message message set string property pi not a number message get double property pi fail 3 5 4 the string to numeric conversions must throw the java lang number format exception if the numeric s value of method does not accept the string value as a valid representation n catch java lang number format exception e catch jmsexception e fail e | if a property is set as a code java |
public void test bytes message 1 try bytes message message sender session create bytes message sender send message message msg receiver receive assert true the message should be an instance of bytes message n msg instanceof bytes message catch jmsexception e fail e | send a code bytes message code with an empty body |
public server socket create server socket int port throws ioexception server socket active socket new server socket port backlog bind address return active socket | create a server socket on the specified port port 0 indicates |
public void test string2 double 1 try message message sender session create message message set string property pi 3 14159 assert equals 3 14159 message get double property pi 0 catch jmsexception e fail e | if a property is set as a code java |
public void test text message 1 try text message message sender session create text message sender send message message msg receiver receive assert true the message should be an instance of text message n msg instanceof text message catch jmsexception e fail e | send a code text message code with an empty body |
public void test get property names try message message sender session create message message set jmscorrelation id foo enumeration enum message get property names assert true 3 5 6 the get property names method does not return the names of the jms standard header field e g jmscorrelation id n enum has more elements catch jmsexception e fail e | test that the code message |
public socket create socket string host int port throws ioexception try permits acquire return new socket host port catch interrupted exception ex throw new ioexception failed to acquire fifosemaphore for client socket factory finally permits release | create a server socket on the specified port port 0 indicates |
public void test property iteration try message message sender session create message enumeration enum message get property names assert true no property yet defined n enum has more elements message set double property pi 3 14159 enum message get property names assert equals one property defined of name pi n pi string enum next element catch jmsexception e fail e | test that the code message |
public void test clear properties 2 try text message message sender session create text message message set text foo message clear properties assert equals 3 5 7 clearing a message s property entries does not clear the value of its body n foo message get text catch jmsexception e fail e | test that the code message |
public void test string2 float 2 try message message sender session create message message set string property pi not a number message get float property pi fail 3 5 4 the string to numeric conversions must throw the java lang number format exception if the numeric s value of method does not accept the string value as a valid representation n catch java lang number format exception e catch jmsexception e fail e | if a property is set as a code java |
public void test clear properties 1 try text message message sender session create text message message set string property prop foo message clear properties assert equals 3 5 7 a message s properties are deleted by the clear properties method n null message get string property prop catch jmsexception e fail e | test that the code message |
public class get type return character class | get the target class type for this coercion handler |
public class get type return file class | get the target class type for this tt coercion handler tt |
public class get type return class class | get the target class type for this tt coercion handler tt |
public object coerce object value class type throws coercion exception if value get class equals string class return coerce string value throw new not coercible exception value | coerces the given value into the given type which should be |
public object coerce string value char temp value to char array if temp length 0 return null return new character temp 0 | coerces the given string into a character by taking off the first |
public object coerce string value return new file value | coerces the given string into a tt file tt by creating attempting |
public class get type throw new not implemented exception handler is not bound | get the target class type for this coercion handler |
public void test string2 float 1 try message message sender session create message message set string property pi 3 14159 assert equals 3 14159 f message get float property pi 0 catch jmsexception e fail e | if a property is set as a code java |
public object coerce string value try return class for name value catch class not found exception e throw new not coercible exception value e | coerces the given string into a tt class tt by doing a |
public byte byte value return byte long value | returns the value of the specified number as a code byte code |
public short set short s short old value value s return old | set the value |
public short short value return short long value | returns the value of the specified number as a code short code |
public long increment return count | increment the counter |
public boolean set boolean b boolean old value value b return old | set the value |
public long decrement return count | decrement the counter |
public boolean commit short assumed short b boolean success assumed value if success value b return success | set the value to value only if the current value is equal to |
public boolean set boolean b boolean old value value b boolean value return old | set the value |
public short swap mu short b if b this return value short temp value value b value b value temp return value | swap values with another mutable short |
public boolean set mu boolean b boolean old value value b value return old | set the value |
public short increment return value | increment the value of this mutable short |
public boolean equals final object obj if obj this return true if obj null obj get class get class return long counter obj count count return false | check if the given object is equal to this |
public short decrement return value | decrement the value of this mutable short |
public string to string return string value of count | return a string representation of this |
public void test string2 long 2 try message message sender session create message message set string property pi 3 14159 message get long property pi fail 3 5 4 the string to numeric conversions must throw the java lang number format exception if the numeric s value of method does not accept the string value as a valid representation n catch java lang number format exception e catch jmsexception e fail e | if a property is set as a code java |
public short add short amount return value amount | add the specified amount |
public boolean commit boolean assumed boolean b boolean success assumed value if success value b return success | set the value to value only if the current value is equal to |
public short subtract short amount return value amount | subtract the specified amount |
public void run try work target timed out work catch throwable t throwable handler add throwable handler type error t synchronized work if work index timeout impl cwait work index timeout impl done work notify all wake up cancel threads else work index timeout impl done | override to fire the timeout |
public short multiply short factor return value factor | multiply by the specified factor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.