/// <summary>
        /// Performs input validation and gets activity libraries that match with search 
        /// parameters without including assemblies.
        /// </summary>
        /// <param name="request">GetLibraryAndActivitiesDC.</param>
        /// <returns>GetLibraryAndActivitiesDC object.</returns>
        public static GetAllActivityLibrariesReplyDC GetActivityLibrariesWithoutDlls(GetAllActivityLibrariesRequestDC request)
        {
            ActivityLibraryDC newRequest = null;
            if (request != null)
            {
                newRequest = new ActivityLibraryDC();
                newRequest.Name = null;
                newRequest.VersionNumber = null;
                newRequest.Incaller = request.Incaller;
                newRequest.IncallerVersion = request.IncallerVersion;
            }

            GetAllActivityLibrariesReplyDC reply = new GetAllActivityLibrariesReplyDC();

            try
            {
                // Validates the input and throws ValidationException for any issues found.
                newRequest.ValidateGetRequest();

                // Gets the activity libraries that match search criteria.
                reply.List = ActivityLibraryRepositoryService.GetActivityLibraries(newRequest, false);
            }
            catch (ValidationException e)
            {
                e.HandleException();
            }
            catch (DataAccessException e)
            {
                e.HandleException();
            }

            return reply;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Verify GET ALL FROM etblActivityLibraries Table for invalid request object
        /// </summary>
        private void VerifyGetAllActivityLibrariesForInvalidRequestObject()
        {
            getAllActivityLibrariesRequestDC = new GetAllActivityLibrariesRequestDC();
            getAllActivityLibrariesReplyDC = null;

            getAllActivityLibrariesReplyDC = devBranchProxy.GetAllActivityLibraries(getAllActivityLibrariesRequestDC);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Verify GET ALL FROM etblActivityLibraries Table
        /// </summary>
        private void GetAllActivityLibraries()
        {
            getAllActivityLibrariesRequestDC = new GetAllActivityLibrariesRequestDC();
            getAllActivityLibrariesReplyDC = null;

            //Populate the request data
            getAllActivityLibrariesRequestDC.Incaller = IN_CALLER;
            getAllActivityLibrariesRequestDC.IncallerVersion = IN_CALLER_VERSION;
            getAllActivityLibrariesRequestDC.InInsertedByUserAlias = USER;
            getAllActivityLibrariesRequestDC.InUpdatedByUserAlias = USER;

            getAllActivityLibrariesReplyDC = devBranchProxy.GetAllActivityLibraries(getAllActivityLibrariesRequestDC);

            Assert.IsNotNull(getAllActivityLibrariesReplyDC, "getAllActivityLibrariesReplyDC is null");
            Assert.IsNotNull(getAllActivityLibrariesReplyDC.List, "getAllActivityLibrariesReplyDC.List is null");
            Assert.AreNotEqual(0, getAllActivityLibrariesReplyDC.List.Count, "getAllActivityLibrariesReplyDC.List is empty");
            Assert.IsTrue(getAllActivityLibrariesReplyDC.List.Count > 1);  // Expecting many items to return.  Better to perform precise initialization and assert the expected count dynamically.
        }