edu.wpi.ejutr.logger
Class LogAssertion

java.lang.Object
  extended by edu.wpi.ejutr.logger.LogAssertion
All Implemented Interfaces:
EJUTRLogEntry

public class LogAssertion
extends java.lang.Object
implements EJUTRLogEntry

Object representing assertions made within EJUTR. The contents of this object are later parsed into a string and written to a JUnit Test Method.

Author:
bigben - bigben@wpi.edu

Field Summary
 
Fields inherited from interface edu.wpi.ejutr.logger.EJUTRLogEntry
ASSERTION, METHOD_INVOKATION, OBJECT_ADDITION, OBJECT_REMOVAL
 
Constructor Summary
LogAssertion(java.lang.String lhs, boolean assertResult)
          constructor.
LogAssertion(java.lang.String lhs, java.lang.String comparison, java.lang.String rhs, boolean assertResult)
          constructor.
 
Method Summary
 int getLogEntryType()
          Returns the type of log entry this is.
 java.lang.String to_String()
          Returns a string representation of the log entry.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogAssertion

public LogAssertion(java.lang.String lhs,
                    boolean assertResult)
constructor.

Parameters:
lhs - the left-hand-side of the assertion.
assertResult - the expected result of the assertion, either true or false.

LogAssertion

public LogAssertion(java.lang.String lhs,
                    java.lang.String comparison,
                    java.lang.String rhs,
                    boolean assertResult)
constructor.

Parameters:
lhs - the left-hand-side of the assertion.
comparison - the comparison operator used within this assertion.
rhs - the right-hand-side of the assertion.
assertResult - the expected result of the assertion.
Method Detail

to_String

public java.lang.String to_String()
Description copied from interface: EJUTRLogEntry
Returns a string representation of the log entry. Ideally this will be placed directly into a file output stream. Therefore, the responsibility of each class that implements this interface is to ensure that this method returns a string utilizing proper Java/JUnit syntax.

Specified by:
to_String in interface EJUTRLogEntry
Returns:
String representation of log entry

getLogEntryType

public int getLogEntryType()
Description copied from interface: EJUTRLogEntry
Returns the type of log entry this is.

Specified by:
getLogEntryType in interface EJUTRLogEntry
Returns:
The type of log entry this is.