<commit_before>package jp.toastkid.yobidashi.settings.color

import io.mockk.coVerify
import io.mockk.every
import io.mockk.mockk
import io.mockk.verify
import org.junit.Test

/**
 * @author toastkidjp
 */
class RandomColorInsertionTest {

    @Test
    fun test() {
        val repository = mockk<SavedColorRepository>()
        every { repository.add(any()) }.answers { Unit }

        val afterInserted = mockk<() -> Unit>()
        every { afterInserted.invoke() }.answers { Unit }

        RandomColorInsertion(repository).invoke(afterInserted)
<commit_msg>refactor #523 Fix unit test.<commit_after>package jp.toastkid.yobidashi.settings.color

import io.mockk.coVerify
import io.mockk.every
import io.mockk.mockk
import org.junit.Test

/**
 * @author toastkidjp
 */
class RandomColorInsertionTest {

    @Test
    fun test() {
        val repository = mockk<SavedColorRepository>()
        every { repository.add(any()) }.answers { 1L }

        val afterInserted = mockk<() -> Unit>()
        every { afterInserted.invoke() }.answers { Unit }

        RandomColorInsertion(repository).invoke(afterInserted)

{'fraction_non_alphanumeric': 0.118491921005386, 'fraction_numerical': 0.003590664272890485, 'mean_word_length': 3.3897637795275593, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4673571', 'n_tokens_mistral': 365, 'n_tokens_neox': 347, 'n_words': 72}