use of com.google.copybara.util.console.testing.LogSubjects.LogSubject in project copybara by google.
the class TestingConsoleTest method assertFailsForPartialMatch.
@Test
public void assertFailsForPartialMatch() {
console.error("jjj_asdf_mmm");
final LogSubject logSubject = console.assertThat();
expectAssertion(".*jjj_asdf_mmm.*", () -> logSubject.matchesNext(MessageType.ERROR, "asdf"));
}
use of com.google.copybara.util.console.testing.LogSubjects.LogSubject in project copybara by google.
the class TestingConsoleTest method testFailsForPartialMatch.
@Test
public void testFailsForPartialMatch() {
console.error("jjj_asdf_mmm");
LogSubject logSubject = console.assertThat();
expectAssertion(".*jjj_asdf_mmm.*", () -> logSubject.matchesNext(MessageType.ERROR, "asdf"));
}
use of com.google.copybara.util.console.testing.LogSubjects.LogSubject in project copybara by google.
the class TestingConsoleTest method testFailsWhenNoMoreMessagesRemain.
@Test
public void testFailsWhenNoMoreMessagesRemain() {
console.error("foo");
LogSubject logSubject = console.assertThat().matchesNext(MessageType.ERROR, "foo");
expectAssertion("no more log messages.*", () -> logSubject.matchesNext(MessageType.ERROR, "foo"));
}
use of com.google.copybara.util.console.testing.LogSubjects.LogSubject in project copybara by google.
the class TestingConsoleTest method assertFailsWhenNoMoreMessagesRemain.
@Test
public void assertFailsWhenNoMoreMessagesRemain() {
console.error("foo");
final LogSubject logSubject = console.assertThat().matchesNext(MessageType.ERROR, "foo");
expectAssertion("no more log messages.*", () -> logSubject.matchesNext(MessageType.ERROR, "foo"));
}
use of com.google.copybara.util.console.testing.LogSubjects.LogSubject in project copybara by google.
the class TestingConsoleTest method assertMessageTypeWrong2.
@Test
public void assertMessageTypeWrong2() {
console.info("bar");
final LogSubject logSubject = console.assertThat();
expectAssertion(".*bar.*", () -> logSubject.matchesNext(MessageType.PROGRESS, "bar"));
}
Aggregations