public void TestSetup()
        {
            authentication = new GoAberWS.AuthHeader();
            authentication.authtoken = "admin_token";

            activityData = new GoAberWS.ActivityData();
            activityData.value = 4;
            activityData.date = DateTime.Now;
            activityData.categoryUnitId = 1;

            activityData2 = new GoAberWS.ActivityData();
            activityData2.value = 50;
            activityData2.date = DateTime.Now;
            activityData2.categoryUnitId = 2;
        }
Esempio n. 2
0
        public void AddData(string ls_authtoken)
        {
            ConsumerEvent lo_event = new ConsumerEvent();
            try {
                GoAberWS.AuthHeader lo_authentication = new GoAberWS.AuthHeader();
                lo_authentication.authtoken = ls_authtoken;
                GoAberWS.ActivityData[] lo_data = new GoAberWS.ActivityData[1];
                lo_data[0] = new GoAberWS.ActivityData();
                lo_data[0].value = 4;
                lo_data[0].date = DateTime.Now;
                lo_data[0].categoryUnitId = 1;

                GoAberWS.GoAberWSSoapClient lo_service = new GoAberWS.GoAberWSSoapClient();
                bool lb_res = lo_service.AddActivityData(lo_authentication, lo_data);
                lo_event.result = lb_res;
            } catch (Exception e)
            {
                lo_event.result = false;
            }
            ConsumerUpdate(this, lo_event);
        }