<commit_before>package engineer.carrot.warren.warren.irc.message

import engineer.carrot.warren.kale.irc.message.IrcMessage
import engineer.carrot.warren.kale.irc.message.IrcMessageSerialiser
import org.junit.Assert.*
import org.junit.Test

class IrcMessageSerialiserTests {

    // Properly formed test cases

    @Test fun test_singleCommand() {
        val message = serialiseMessage(IrcMessage(command = "TEST"))

        assertEquals(message, "TEST")
    }

    @Test fun test_prefixAndCommand() {
        val message = serialiseMessage(IrcMessage(prefix = "user!host@server", command = "TEST"))

        assertEquals(message, ":user!host@server TEST")
    }

    @Test fun test_prefixCommandAndParameters() {
        val message = serialiseMessage(IrcMessage(prefix = "user!host@server", command = "TEST", parameters = listOf("some", "parameters", "And some trailing parameters! ")))

        assertEquals(message, ":user!host@server TEST some parameters :And some trailing parameters! ")<commit_msg>Fix wrong package<commit_after>package engineer.carrot.warren.kale.irc.message

import org.junit.Assert.*
import org.junit.Test

class IrcMessageSerialiserTests {

    // Properly formed test cases

    @Test fun test_singleCommand() {
        val message = serialiseMessage(IrcMessage(command = "TEST"))

        assertEquals(message, "TEST")
    }

    @Test fun test_prefixAndCommand() {
        val message = serialiseMessage(IrcMessage(prefix = "user!host@server", command = "TEST"))

        assertEquals(message, ":user!host@server TEST")
    }

    @Test fun test_prefixCommandAndParameters() {
        val message = serialiseMessage(IrcMessage(prefix = "user!host@server", command = "TEST", parameters = listOf("some", "parameters", "And some trailing parameters! ")))

        assertEquals(message, ":user!host@server TEST some parameters :And some trailing parameters! ")
{'fraction_non_alphanumeric': 0.11546610169491525, 'fraction_numerical': 0.0, 'mean_word_length': 4.32112676056338, 'pattern_counts': {'":': 4, '<': 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': '4503832', 'n_tokens_mistral': 533, 'n_tokens_neox': 514, 'n_words': 122}