From df7d7981b56a4560c95ea7e9b194080e93398ecf Mon Sep 17 00:00:00 2001 From: Matt Windsor Date: Mon, 21 Mar 2011 21:54:31 +0000 Subject: GREAT PACKAGE RESHUFFLE: Everything is now organised into frontend, backend and common (to frontend and backend) packages. Things may have been broken. Doc refresh. --- .../org/ury/frontend/client/test/ClientTest.java | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/uk/org/ury/frontend/client/test/ClientTest.java (limited to 'src/uk/org/ury/frontend/client/test') diff --git a/src/uk/org/ury/frontend/client/test/ClientTest.java b/src/uk/org/ury/frontend/client/test/ClientTest.java new file mode 100644 index 0000000..d75a0ac --- /dev/null +++ b/src/uk/org/ury/frontend/client/test/ClientTest.java @@ -0,0 +1,57 @@ +/** + * + */ +package uk.org.ury.frontend.client.test; + +import java.util.Map; + +import junit.framework.Assert; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import uk.org.ury.common.protocol.Directive; +import uk.org.ury.common.protocol.exceptions.DecodeFailureException; +import uk.org.ury.frontend.client.Client; + +/** + * JUnit test for the low-level client logic. + * + * @author Matt Windsor + */ +public class ClientTest { + + /** + * @throws java.lang.Exception + */ + @Before + public void setUp() throws Exception { + } + + /** + * @throws java.lang.Exception + */ + @After + public void tearDown() throws Exception { + } + + /** + * Test method for {@link uk.org.ury.frontend.client.Client#get(java.lang.String)}. + */ + @Test + public void testGet() { + Client client = new Client(); + + Map response = null; + + try { + response = client.get("/server/ServerRequestHandler?function=test"); + } catch (DecodeFailureException e) { + e.printStackTrace(); + } + + Assert.assertEquals("Test succeeded.", + response.get(Directive.INFO.toString())); + } +} -- cgit v1.2.3