use of com.android.ddmlib.logcat.LogCatMessage in project android by JetBrains.
the class AndroidLogcatFormatterTest method formatMessageToParseMessageKeepsAllInformation.
@Test
public void formatMessageToParseMessageKeepsAllInformation() {
LogCatHeader header = new LogCatHeader(LogLevel.DEBUG, 13, 123, "system_process", "ConnectivityService", LogCatTimestamp.fromString("02-12 14:32:46.526"));
String output = AndroidLogcatFormatter.formatMessageFull(header, "xyz");
LogCatMessage message = AndroidLogcatFormatter.parseMessage(output);
LogCatHeader header2 = message.getHeader();
assertEquals(header.getTimestamp(), header2.getTimestamp());
assertEquals(header.getLogLevel(), header2.getLogLevel());
assertEquals(header.getPid(), header2.getPid());
assertEquals(header.getTid(), header2.getTid());
assertEquals(header.getAppName(), header2.getAppName());
assertEquals(header.getTag(), header2.getTag());
assertEquals("xyz", message.getMessage());
}
Aggregations