1
0
mirror of https://github.com/deavmi/birchwood synced 2024-09-20 07:43:55 +02:00
- Added comment to make this `Client` class abstract

Unit tests

- Added unit test to test `channelMessage(string, string[])`
This commit is contained in:
Tristan B. Velloza Kildaire 2023-03-08 20:13:55 +02:00
parent b33414fcf0
commit 72d473a5c4

View File

@ -160,6 +160,8 @@ public struct ConnectionInfo
} }
} }
// TODO: Make abstract and for unit tests make a `DefaultClient`
// ... which logs outputs for the `onX()` handler functions
public class Client : Thread public class Client : Thread
{ {
/* Connection information */ /* Connection information */
@ -1197,6 +1199,12 @@ public class Client : Thread
Thread.sleep(dur!("seconds")(2)); Thread.sleep(dur!("seconds")(2));
client.command(new Message("", "PRIVMSG", "deavmi naai")); client.command(new Message("", "PRIVMSG", "deavmi naai"));
/**
* Test sending a message to a channel
*/
client.channelMessage("This is a test message sent to a channel", ["#birchwood"]);
/* TODO: Add a check here to make sure the above worked I guess? */ /* TODO: Add a check here to make sure the above worked I guess? */
/* TODO: Make this end */ /* TODO: Make this end */
// while(true) // while(true)