Package org.openbravo.test.webservice
Class WSUpdateTest
- java.lang.Object
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.test.webservice.BaseWSTest
-
- org.openbravo.test.webservice.WSUpdateTest
-
public class WSUpdateTest extends BaseWSTest
Test webservice for reading, updating and posting. The test cases here require a running Openbravo at http://localhost:8080/openbravo. IMPORTANT: Test cases are called by one of them called testContent(). The name of the rest of the test cases NOT begin by "test...".- Author:
- mtaal
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openbravo.test.webservice.BaseWSTest
BaseWSTest.SimpleErrorHandler
-
-
Field Summary
-
Fields inherited from class org.openbravo.test.webservice.BaseWSTest
LOGIN, PWD
-
Fields inherited from class org.openbravo.test.base.OBBaseTest
DOLLAR, DOLLAR_ID, EURO, EURO_ID, QA_TEST_ADMIN_USER_ID, QA_TEST_CLIENT_ID, QA_TEST_ORG_ID, TEST_BP_CATEGORY_ID, TEST_CLIENT_ID, TEST_LOCATION_ID, TEST_ORDER_ID, TEST_ORG_ID, TEST_ORG_TREE, TEST_PRODUCT_ID, TEST_ROLE_ID, TEST_US_ORG_ID, TEST_USER_ID, TEST_WAREHOUSE_ID, TEST2_USER_ID, userIds, watchFailures
-
-
Constructor Summary
Constructors Constructor Description WSUpdateTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testACreateCity()
Creates a city through a webservice calls.void
testBReadUpdateCity()
Read the created city using a webservice and make a small change and post it back.void
testCIncorrectRootTag()
Test is an error is returned if an incorrect message is posted.void
testDReadAddDeleteCity()
Test case executes the following steps: 1) get a city, 2) create a city, 3) count the cities, 4) retrieve the cities through a query, 5) delete the new city, 6) check that it has been deleted.void
testEReadAddDeleteQueryCity()
void
testFDoTest14973()
DalWebServiceServlet does not report errors which occur at commit timevoid
testGReadAddCityWrongMethodError()
Add a new city using the wrong HTTP method.void
testHRemoveCity()
Cleans up the database by removing the city.-
Methods inherited from class org.openbravo.test.webservice.BaseWSTest
createConnection, doContentRequest, doContentRequest, doDirectDeleteRequest, doTestGetRequest, doTestGetRequest, doTestGetRequest, getLogin, getOpenbravoURL, getPassword, getTagValue, validateXML
-
Methods inherited from class org.openbravo.test.base.OBBaseTest
addReadWriteAccess, classSetUp, commitTransaction, count, getConnectionProvider, getOneInstance, getRandomUser, getTestLogAppender, initializeDalLayer, initializeDisabledTestCases, initializeTestLogAppender, isErrorOccured, reportException, rollback, setLogStackTraces, setQAAdminContext, setSystemAdministratorContext, setTestAdminContext, setTestLogAppenderLevel, setTestUserContext, setUp, setUserContext, shouldMockServletContext, staticInitializeDalLayer, testDone
-
-
-
-
Method Detail
-
testACreateCity
public void testACreateCity()
Creates a city through a webservice calls. This test must be run before the others because it sets the cityId member in this class.
-
testBReadUpdateCity
public void testBReadUpdateCity() throws Exception
Read the created city using a webservice and make a small change and post it back.- Throws:
Exception
-
testCIncorrectRootTag
public void testCIncorrectRootTag() throws Exception
Test is an error is returned if an incorrect message is posted.- Throws:
Exception
-
testDReadAddDeleteCity
public void testDReadAddDeleteCity() throws Exception
Test case executes the following steps: 1) get a city, 2) create a city, 3) count the cities, 4) retrieve the cities through a query, 5) delete the new city, 6) check that it has been deleted.- Throws:
Exception
-
testEReadAddDeleteQueryCity
public void testEReadAddDeleteQueryCity() throws Exception
- Throws:
Exception
-
testFDoTest14973
public void testFDoTest14973() throws Exception
DalWebServiceServlet does not report errors which occur at commit time- Throws:
Exception
-
testGReadAddCityWrongMethodError
public void testGReadAddCityWrongMethodError() throws Exception
Add a new city using the wrong HTTP method.- Throws:
Exception
-
-