

package gov.va.med.cds.testharness.logger;


import gov.va.med.cds.logger.ApplicationLoggerInterface;

import org.apache.commons.logging.Log;
import org.junit.Assert;


public class AssertApplicationLogger
    implements
        ApplicationLoggerInterface
{
    private Log logger = null;
    private String message = null;
    private Exception exception = null;


    public AssertApplicationLogger( )
    {
    }


    public AssertApplicationLogger( String message, Exception ex )
    {
        this.message = message;
        this.exception = ex;
    }


    public AssertApplicationLogger( Log logger2 )
    {
        this.logger = logger2;
    }


    public void logMessage( Exception ex )
    {
        this.logger.error( ex );

    }


    public void logMessage( String message, Exception ex2 )
    {
        Assert.assertEquals( this.message, message );
        Assert.assertEquals( ex2.toString(), this.exception.toString() );

    }


    public void setMessage( String message )
    {
        this.message = message;
    }


    public void setException( Exception ex )
    {
        this.exception = ex;
    }


    public String getMessage( )
    {
        return this.message;
    }


    public Exception getException( )
    {
        return this.exception;
    }


    public void setLogger( Log logger )
    {
        this.logger = logger;
    }


    public Log getLogger( )
    {
        return this.logger;
    }
}
