From d6751210341b6a5ea61d2e22f0949b1882168a5d Mon Sep 17 00:00:00 2001 From: Benjamin Date: Sat, 26 Feb 2022 13:48:46 +0100 Subject: [PATCH] =?UTF-8?q?Cr=C3=A9ation=20d'un=20test=20pour=20la=20r?= =?UTF-8?q?=C3=A8gle=20HelloRule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../protocol/rules/HelloRuleTest.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 app/src/test/java/lightcontainer/protocol/rules/HelloRuleTest.java diff --git a/app/src/test/java/lightcontainer/protocol/rules/HelloRuleTest.java b/app/src/test/java/lightcontainer/protocol/rules/HelloRuleTest.java new file mode 100644 index 0000000..8305c90 --- /dev/null +++ b/app/src/test/java/lightcontainer/protocol/rules/HelloRuleTest.java @@ -0,0 +1,20 @@ +package lightcontainer.protocol.rules; + +import lightcontainer.protocol.ProtocolReader; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class HelloRuleTest { + + @Test + public void whenRuleIsRightThenIsExecute() { + // GIVEN + ProtocolReader protocolReader = new HelloRule(); + String request = "HELLO bento 42890\r\n"; + + // EXPECT + assertTrue(protocolReader.execute(request)); + } + +} \ No newline at end of file