<commit_before>package com.jenjinstudios.client.net;

import com.jenjinstudios.core.MessageIO;
import com.jenjinstudios.core.io.Message;
import com.jenjinstudios.core.io.MessageInputStream;
import com.jenjinstudios.core.io.MessageOutputStream;
import org.testng.Assert;
import org.testng.annotations.Test;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;

/**
 * Used to test the Client class.
 * @author <NAME>
 */
public class ClientTest
{
    /**
     * Test the AddRepeatedTask method.
     */
    @Test
	public void testAddRepeatedTask() {
		MessageInputStream mis = mock(MessageInputStream.class);
		MessageOutputStream mos = mock(MessageOutputStream.class);
		MessageIO messageIO = new MessageIO(mis, mos);
		Runnable r = mock(Runnable.class);
		Client client = new Client(messageIO);
		client.addRepeatedTask(r);
		client.runRepeatedTasks();
		verify(r).run();
	}

    /**
     * Test the generateLogoutRequest method.
     */
    @Test
    public void testGenerateLogoutRequest() {
        Message message = AuthClient.generateLogoutRequest();
        Assert.assertEquals(message.name, "LogoutRequest", "Expectet LogoutRequest message");
    }

    /**
     * Test the generateLoginRequest method.
     */
    @Test
    public void testGenerateLoginRequest() {
        Message message = AuthClient.generateLoginRequest(new ClientUser("Foo", "Bar"));
        Assert.assertEquals(message.name, "LoginRequest", "Expected login request");
        Assert.assertEquals(message.getArgument("username"), "Foo", "Username was not expected.");
        Assert.assertEquals(message.getArgument("password"), "Bar");
    }

}<commit_msg>Added assertion message<commit_after>package com.jenjinstudios.client.net;

import com.jenjinstudios.core.MessageIO;
import com.jenjinstudios.core.io.Message;
import com.jenjinstudios.core.io.MessageInputStream;
import com.jenjinstudios.core.io.MessageOutputStream;
import org.testng.Assert;
import org.testng.annotations.Test;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;

/**
 * Used to test the Client class.
 * @author <NAME>
 */
public class ClientTest
{
    /**
     * Test the AddRepeatedTask method.
     */
    @Test
	public void testAddRepeatedTask() {
		MessageInputStream mis = mock(MessageInputStream.class);
		MessageOutputStream mos = mock(MessageOutputStream.class);
		MessageIO messageIO = new MessageIO(mis, mos);
		Runnable r = mock(Runnable.class);
		Client client = new Client(messageIO);
		client.addRepeatedTask(r);
		client.runRepeatedTasks();
		verify(r).run();
	}

    /**
     * Test the generateLogoutRequest method.
     */
    @Test
    public void testGenerateLogoutRequest() {
        Message message = AuthClient.generateLogoutRequest();
        Assert.assertEquals(message.name, "LogoutRequest", "Expectet LogoutRequest message");
    }

    /**
     * Test the generateLoginRequest method.
     */
    @Test
    public void testGenerateLoginRequest() {
        Message message = AuthClient.generateLoginRequest(new ClientUser("Foo", "Bar"));
        Assert.assertEquals(message.name, "LoginRequest", "Expected login request");
        Assert.assertEquals(message.getArgument("username"), "Foo", "Username was not expected.");
        Assert.assertEquals(message.getArgument("password"), "<PASSWORD>", "Password was not expected.");
    }

}
{'fraction_non_alphanumeric': 0.11719443622373484, 'fraction_numerical': 0.0, 'mean_word_length': 4.029761904761905, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '2279589', 'n_tokens_mistral': 991, 'n_tokens_neox': 958, 'n_words': 210}