class EventStreamValidatorTest {
@Test
- fun simple_sequence_of_actions() {
+ fun `simple sequence of actions`() {
val list = listOf(LogEventFixtures.completion_started_3_items_shown, LogEventFixtures.explicit_select_position_0)
validate(list, list.map { LogEventSerializer.toString(it) }, emptyList())
}
@Test
- fun sample_error_sequence_of_actions() {
+ fun `sample error sequence of actions`() {
val list = listOf(LogEventFixtures.completion_started_3_items_shown, LogEventFixtures.explicit_select_position_1)
validate(list, expectedOut = emptyList(), expectedErr = list.serialize())
}
@Test
- fun up_down_actions() {
+ fun `up down actions`() {
val list = listOf(
LogEventFixtures.completion_started_3_items_shown,
LogEventFixtures.down_event_new_pos_1,
}
@Test
- fun up_down_actions_wrong() {
+ fun `up down actions wrong`() {
val list = listOf(
LogEventFixtures.completion_started_3_items_shown,
LogEventFixtures.down_event_new_pos_1,
}
@Test
- fun selected_by_typing_relaxed_conditions() {
+ fun `selected by typing relaxed conditions`() {
val list = listOf(
LogEventFixtures.completion_started_3_items_shown,
LogEventFixtures.type_event_current_pos_0_left_ids_1_2,
}
@Test
- fun selected_by_typing_error() {
+ fun `selected by typing error`() {
val list = listOf(
LogEventFixtures.completion_started_3_items_shown,
LogEventFixtures.type_event_current_pos_0_left_ids_0_1,
}
@Test
- fun test_three_new_files_created() {
+ fun `test three new files created`() {
provider.getUniqueFile().createNewFile()
provider.getUniqueFile().createNewFile()
provider.getUniqueFile().createNewFile()
}
@Test
- fun test_size_with_new_lines() {
+ fun `test size with new lines`() {
val line = "text"
storage.appendLine(line)
assertThat(storage.sizeWithNewLine("")).isEqualTo(line.length + 2 * System.lineSeparator().length)
}
@Test
- fun test_size_is_same_as_file_size() {
+ fun `test size is same as file size`() {
val line = "text"
storage.appendLine(line)
storage.appendLine(line)
storage.dump(tmpFile)
assertThat(tmpFile.length()).isEqualTo(expectedSize.toLong())
}
-
-
}
}
@Test
- fun test_chunk_is_around_256Kb() {
+ fun `test chunk is around 256Kb`() {
val bytesToWrite = 1024 * 200
val text = StringUtil.repeat("c", bytesToWrite)
fileLogger.println(text)
}
@Test
- fun test_multiple_chunks() {
+ fun `test multiple chunks`() {
writeKb(1024)
val files = filesProvider.getDataFiles()
@Test
- fun test_delete_old_stuff() {
+ fun `test delete old stuff`() {
writeKb(4096)
var files = filesProvider.getDataFiles()
}
fileLogger.dispose()
}
-
}
\ No newline at end of file