コード例 #1
0
            private void ArrangePModeThenAgreementRefIsNotEnough(AS4.Model.PMode.AgreementReference agreementRef)
            {
                ReceivePMode pmode = CreatePModeWithAgreementRef(agreementRef);

                DifferentiatePartyInfo(pmode);
                SetupPModes(pmode, new ReceivePMode());
            }
コード例 #2
0
        protected ReceivePMode CreatePModeWithAgreementRef(AS4.Model.PMode.AgreementReference agreementRef)
        {
            ReceivePMode pmode = CreateDefaultPMode("defaultPMode");

            pmode.MessagePackaging.CollaborationInfo.AgreementReference = agreementRef;

            return(pmode);
        }
コード例 #3
0
        protected ReceivePMode CreatePModeWithActionService(string service, string action)
        {
            ReceivePMode pmode = CreateDefaultPMode("defaultPMode");

            pmode.MessagePackaging.CollaborationInfo.Action        = action;
            pmode.MessagePackaging.CollaborationInfo.Service.Value = service;

            return(pmode);
        }
コード例 #4
0
            private void ArrangePModeThenServiceAndActionIsNotEnough(string action, string service)
            {
                ReceivePMode pmode = CreatePModeWithActionService(service, action);

                pmode.MessagePackaging.CollaborationInfo.AgreementReference.Value = "not-equal";
                DifferentiatePartyInfo(pmode);
                SetupPModes(pmode, new ReceivePMode()
                {
                    Id = "other id"
                });
            }
コード例 #5
0
        private static void DifferentiatePartyInfo(ReceivePMode pmode)
        {
            const string fromId = "from-Id";
            const string toId   = "to-Id";

            var fromParty = new Party {
                Role = fromId, PartyIds = { new PartyId {
                                                Id = fromId
                                            } }
            };
            var toParty = new Party {
                Role = toId, PartyIds = { new PartyId {
                                              Id = toId
                                          } }
            };

            pmode.MessagePackaging.PartyInfo = new PartyInfo {
                FromParty = fromParty, ToParty = toParty
            };
        }
コード例 #6
0
            public async Task Dont_Use_Scoring_System_ReceivingPMode_When_Already_Configure()
            {
                // Arrange
                var expected = new ReceivePMode {
                    Id = "static-receive-configured"
                };

                // Act
                StepResult result = await _step.ExecuteAsync(
                    new MessagingContext(
                        AS4Message.Empty,
                        MessagingContextMode.Receive)
                {
                    ReceivingPMode = expected
                });

                // Assert
                Assert.Same(
                    expected,
                    result.MessagingContext.ReceivingPMode);
            }
コード例 #7
0
 protected void AssertPMode(ReceivePMode expectedPMode, StepResult result)
 {
     Assert.NotNull(expectedPMode);
     Assert.NotNull(result);
     Assert.Equal(expectedPMode, result.MessagingContext.ReceivingPMode);
 }