Création d'un test pour la règle HelloRule
This commit is contained in:
parent
c1fe6a0a96
commit
d675121034
@ -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));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user