incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: incubator-altrmi/server/impl/src/test/org/apache/altrmi/server/impl LogEnabledServerMonitorTestCase.java
Date Tue, 02 Sep 2003 21:58:34 GMT
hammant     2003/09/02 14:58:34

  Modified:    server/impl/src/test/org/apache/altrmi/server/impl
                        LogEnabledServerMonitorTestCase.java
  Log:
  Rename and add case
  
  Revision  Changes    Path
  1.2       +24 -1     incubator-altrmi/server/impl/src/test/org/apache/altrmi/server/impl/LogEnabledServerMonitorTestCase.java
  
  Index: LogEnabledServerMonitorTestCase.java
  ===================================================================
  RCS file: /home/cvs/incubator-altrmi/server/impl/src/test/org/apache/altrmi/server/impl/LogEnabledServerMonitorTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LogEnabledServerMonitorTestCase.java	2 Sep 2003 21:54:33 -0000	1.1
  +++ LogEnabledServerMonitorTestCase.java	2 Sep 2003 21:58:34 -0000	1.2
  @@ -67,7 +67,7 @@
           super(string);
       }
   
  -    public void testFoo() {
  +    public void testBadConnectionDebugEnabled() {
   
           Logger logger = new LogEnabledServerMonitorTestCaseLogger() {
               public boolean isDebugEnabled() {
  @@ -87,6 +87,29 @@
           assertTrue(loggerString.indexOf("foo") >= 0);
           assertTrue(loggerString.indexOf("<badConnection>") >= 0);
           assertEquals(loggerThrowable, bce);
  +
  +    }
  +
  +    public void testBadConnectionDebugDisabled() {
  +
  +        Logger logger = new LogEnabledServerMonitorTestCaseLogger() {
  +            public boolean isDebugEnabled() {
  +                return false;
  +            }
  +            public void debug(String string, Throwable throwable) {
  +                loggerString = string;
  +                loggerThrowable = throwable;
  +            }
  +        };
  +
  +        LogEnabledServerMonitor monitor = new LogEnabledServerMonitor(logger);
  +
  +        BadConnectionException bce = new BadConnectionException("bar");
  +        monitor.badConnection(String.class,"foo",bce);
  +
  +        assertNull(loggerString);
  +        assertNull(loggerString);
  +        assertNull(loggerThrowable);
   
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message