author | Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
Fri, 03 Apr 2020 16:32:36 +0200 | |
changeset 416 | 9ed8788a1a4e |
parent 97 | a1dd8447b30f |
permissions | -rw-r--r-- |
jtulach@97 | 1 |
package usage; |
jtulach@97 | 2 |
|
jtulach@97 | 3 |
import org.junit.Test; |
jtulach@97 | 4 |
import static org.junit.Assert.*; |
jtulach@97 | 5 |
import query.Query; |
jtulach@97 | 6 |
|
jtulach@97 | 7 |
public class UseQueryTest { |
jtulach@97 | 8 |
|
jtulach@97 | 9 |
public UseQueryTest() { |
jtulach@97 | 10 |
} |
jtulach@97 | 11 |
|
jtulach@97 | 12 |
@Test public void verifyThatQueryReturnsHello() { |
jtulach@97 | 13 |
Query query = new Query(); |
jtulach@97 | 14 |
Query.Sequence reply = query.computeReply(); |
jtulach@97 | 15 |
assertEquals("Length is correct", 5, reply.length()); |
jtulach@97 | 16 |
|
jtulach@97 | 17 |
assertEquals('H', reply.charAt(0)); |
jtulach@97 | 18 |
assertEquals('e', reply.charAt(1)); |
jtulach@97 | 19 |
assertEquals('l', reply.charAt(2)); |
jtulach@97 | 20 |
assertEquals('l', reply.charAt(3)); |
jtulach@97 | 21 |
assertEquals('o', reply.charAt(4)); |
jtulach@97 | 22 |
} |
jtulach@97 | 23 |
} |