<commit_before>package engineer.carrot.warren.warren.handler

import com.nhaarman.mockito_kotlin.any
import com.nhaarman.mockito_kotlin.mock
import com.nhaarman.mockito_kotlin.never
import com.nhaarman.mockito_kotlin.verify
import engineer.carrot.warren.kale.irc.CharacterCodes
import engineer.carrot.warren.kale.irc.message.rfc1459.PrivMsgMessage
import engineer.carrot.warren.kale.irc.prefix.Prefix
import engineer.carrot.warren.warren.*
import engineer.carrot.warren.warren.event.*
import engineer.carrot.warren.warren.state.ChannelTypesState
import org.junit.Before
import org.junit.Test

class PrivMsgHandlerTests {

    lateinit var handler: PrivMsgHandler
    lateinit var channelsState: ChannelTypesState
    lateinit var mockEventDispatcher: IWarrenEventDispatcher

    @Before fun setUp() {
        channelsState = ChannelTypesState(types = setOf('#', '&'))
        mockEventDispatcher = mock()
        handler = PrivMsgHandler(mockEventDispatcher, channelsState)
    }

    @Test fun test_handle_ChannelMessage_FiresEvent() {<commit_msg>Import cleanup<commit_after>package engineer.carrot.warren.warren.handler

import com.nhaarman.mockito_kotlin.any
import com.nhaarman.mockito_kotlin.mock
import com.nhaarman.mockito_kotlin.never
import com.nhaarman.mockito_kotlin.verify
import engineer.carrot.warren.kale.irc.CharacterCodes
import engineer.carrot.warren.kale.irc.message.rfc1459.PrivMsgMessage
import engineer.carrot.warren.kale.irc.prefix.Prefix
import engineer.carrot.warren.warren.event.*
import engineer.carrot.warren.warren.state.ChannelTypesState
import org.junit.Before
import org.junit.Test

class PrivMsgHandlerTests {

    lateinit var handler: PrivMsgHandler
    lateinit var channelsState: ChannelTypesState
    lateinit var mockEventDispatcher: IWarrenEventDispatcher

    @Before fun setUp() {
        channelsState = ChannelTypesState(types = setOf('#', '&'))
        mockEventDispatcher = mock()
        handler = PrivMsgHandler(mockEventDispatcher, channelsState)
    }

    @Test fun test_handle_ChannelMessage_FiresEvent() {
{'fraction_non_alphanumeric': 0.08503401360544217, 'fraction_numerical': 0.003887269193391642, 'mean_word_length': 5.239393939393939, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1697100', 'n_tokens_mistral': 659, 'n_tokens_neox': 620, 'n_words': 107}