Constructor and Description |
---|
ModelInstanceLogs(List<Log> logs)
Creates model instance logs.
|
Modifier and Type | Method and Description |
---|---|
void |
assertContains(String logMessage)
Asserts that the given log message is contained in these logs.
|
void |
assertContains(String logMessage,
int logLevel)
Asserts that the given log message with a given level is contained in these logs.
|
void |
assertContains5(String logMessage)
Asserts that the given log message is contained in these logs.
|
void |
assertContains5(String logMessage,
int logLevel)
Asserts that the given log message with a given level is contained in these logs.
|
void |
assertLogs(String... expectedLogMessages)
Assert that in log is expected amount of messages with expected values in any order.
|
void |
assertLogs5(String... expectedLogMessages)
Assert that in log is expected amount of messages with expected values in any order.
|
void |
assertSize(int expectedSize)
Asserts the correct log size.
|
void |
assertSize5(int expectedSize)
Asserts the correct log size.
|
boolean |
contains(String logMessage)
Checks whether the collection of logs contains an entry with a given
log message.
|
boolean |
contains(String logMessage,
int logLevel)
Checks whether the logs contain an entry with a given message and level.
|
int |
count(String logMessage)
Counts the number of logs with a given message.
|
Log |
get(int index)
Returns the log at the specified index.
|
Iterator<Log> |
iterator() |
void |
removeLogs(ModelInstanceLogs... otherLogs)
Removes logs.
|
int |
size()
Returns the log size.
|
List<Log> |
toList() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public int size()
public Log get(int index)
index
- public void removeLogs(ModelInstanceLogs... otherLogs)
otherLogs
- public boolean contains(String logMessage)
logMessage
- the log message to comparetrue
if the collection of logs contains an entry with the
given log message; false
otherwisepublic boolean contains(String logMessage, int logLevel)
logMessage
- logLevel
- true
if entry found, false
otherwisepublic int count(String logMessage)
logMessage
- public void assertContains(String logMessage)
logMessage
- public void assertContains5(String logMessage)
logMessage
- public void assertContains(String logMessage, int logLevel)
logMessage
- logLevel
- public void assertContains5(String logMessage, int logLevel)
logMessage
- logLevel
- public void assertSize(int expectedSize)
expectedSize
- public void assertSize5(int expectedSize)
expectedSize
- public void assertLogs(String... expectedLogMessages)
expectedLogMessages
- expected log messages (descriptions)public void assertLogs5(String... expectedLogMessages)
expectedLogMessages
- expected log messages (descriptions)Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.