Création d'un test pour la règle HelloRule

This commit is contained in:
Benjamin Lejeune 2022-02-26 13:48:46 +01:00
parent c1fe6a0a96
commit d675121034

View File

@ -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));
}
}