Esempio n. 1
0
        public List <AgencyCommunicationRequest> GetAgencyCommunicationRequests()
        {
            Tender tender = new TenderDefault().GetGeneralTender();
            List <AgencyCommunicationRequest> generalAgencyCommunicationRequests = new List <AgencyCommunicationRequest>();
            var communicationRequest = new AgencyCommunicationRequest(agencyRequestId, tenderId, agencyRequestTypeId, statusId, requestedByRoleName);

            communicationRequest.AddTender(tender);
            communicationRequest.UpdatePlaintAgencyCommunicationRequest(1, "no");
            communicationRequest.UpdateAgencyCommunicationRequestStatus(1, "");
            communicationRequest.UpdateAgencyCommunicationPlaintRequestStatus(1, 1, null, "", "");
            AgencyCommunicationPlaintStatus PlaintAcceptanceStatus = new AgencyCommunicationPlaintStatus();

            typeof(AgencyCommunicationPlaintStatus).GetProperty(nameof(AgencyCommunicationPlaintStatus.Name)).SetValue(PlaintAcceptanceStatus, "name");

            typeof(AgencyCommunicationRequest).GetProperty(nameof(AgencyCommunicationRequest.PlaintAcceptanceStatus)).SetValue(communicationRequest, PlaintAcceptanceStatus);
            communicationRequest.Negotiations = new List <Negotiation>();
            generalAgencyCommunicationRequests.Add(communicationRequest);

            var communicationRequest2 = new AgencyCommunicationRequest(2, 2, agencyRequestTypeId, statusId, requestedByRoleName);

            communicationRequest2.AddTender(tender);
            communicationRequest2.Negotiations = new List <Negotiation>();
            generalAgencyCommunicationRequests.Add(communicationRequest2);
            return(generalAgencyCommunicationRequests);
        }
        public void Should_UpdateAgencyCommunicationPlaintRequestStatus()
        {
            AgencyCommunicationRequest communicationRequest = new AgencyCommunicationRequest();

            communicationRequest.UpdateAgencyCommunicationPlaintRequestStatus((int)Enums.AgencyCommunicationRequestStatus.Pending, (int)Enums.AgencyPlaintStatus.Rejected, null, "details", REJECTION_REASON);
            communicationRequest.ShouldNotBeNull();
            communicationRequest.StatusId.ShouldBe((int)Enums.AgencyCommunicationRequestStatus.Pending);
            communicationRequest.PlaintAcceptanceStatusId.ShouldBe((int)Enums.AgencyPlaintStatus.Rejected);
            communicationRequest.TenderPlaintRequestProcedureId.ShouldBeNull();
            communicationRequest.RejectionReason.ShouldBe(REJECTION_REASON);
        }