Class DatasourceEventObserver


  • public class DatasourceEventObserver
    extends ObserverBaseTest
    Test cases covering updates through standard datasource that include a persistence observer. Observer is implemented in OrderLineTestObserver.
    Author:
    alostale
    • Constructor Detail

      • DatasourceEventObserver

        public DatasourceEventObserver()
    • Method Detail

      • standardUpdateRequestWithoutObserver

        public void standardUpdateRequestWithoutObserver()
                                                  throws org.codehaus.jettison.json.JSONException
        Updating order line without observer
        Throws:
        org.codehaus.jettison.json.JSONException
      • observerCanModifyPropertyValues

        public void observerCanModifyPropertyValues()
                                             throws org.codehaus.jettison.json.JSONException
        The observer updates line description to a fixed value
        Throws:
        org.codehaus.jettison.json.JSONException
      • observerCanAddNewObjects

        public void observerCanAddNewObjects()
                                      throws org.codehaus.jettison.json.JSONException
        The observer creates a new note on order line
        Throws:
        org.codehaus.jettison.json.JSONException
      • observerCanInstantiateObservedObject

        public void observerCanInstantiateObservedObject()
                                                  throws org.codehaus.jettison.json.JSONException
        Observer does ol.getSalesOrder().getOrderLineList(). Covers issue #32308
        Throws:
        org.codehaus.jettison.json.JSONException
      • observerCanUpdateParentObject

        public void observerCanUpdateParentObject()
                                           throws org.codehaus.jettison.json.JSONException
        Observer updates order line's header
        Throws:
        org.codehaus.jettison.json.JSONException
      • observerFiredByChildObjectObserverShouldBeExecuteOnce

        public void observerFiredByChildObjectObserverShouldBeExecuteOnce()
                                                                   throws org.codehaus.jettison.json.JSONException
        The OrderLine observer updates an order line's header. This action should fire the Order observer and just once.
        Throws:
        org.codehaus.jettison.json.JSONException
      • observerFiredByParentObjectObserverShouldBeExecuteOnce

        public void observerFiredByParentObjectObserverShouldBeExecuteOnce()
                                                                    throws org.codehaus.jettison.json.JSONException
        The Order observer updates an order line. This action should fire the OrderLine observer and just once.
        Throws:
        org.codehaus.jettison.json.JSONException