예제 #1
0
            public void Initializes_fields()
            {
                //Arrange
                const bool forventetLoggForespørselOgRespons = false;
                var        environment = Miljø.FunksjoneltTestmiljøVerifikasjon1;
                var        senderUnitTestCertificate     = DomainUtility.GetSenderSelfSignedCertificate();
                var        oppslagstjenesteConfiguration = new OppslagstjenesteKonfigurasjon(environment, senderUnitTestCertificate);

                //Act

                //Assert
                Assert.Equal(environment, oppslagstjenesteConfiguration.Miljø);
                Assert.Equal(senderUnitTestCertificate, oppslagstjenesteConfiguration.Avsendersertifikat);
                Assert.Equal(forventetLoggForespørselOgRespons, oppslagstjenesteConfiguration.LoggForespørselOgRespons);
            }
            public void Initializes_fields()
            {
                //Arrange
                var environment = Miljø.FunksjoneltTestmiljøVerifikasjon1;
                var proxyScheme = "https";
                var timeout     = 30000;
                var senderUnitTestCertificate = DomainUtility.GetSenderSelfSignedCertificate();
                var clientConfiguration       = new OppslagstjenesteKonfigurasjon(environment, senderUnitTestCertificate);

                //Act

                //Assert
                Assert.Equal(proxyScheme, clientConfiguration.ProxyScheme);
                Assert.Equal(timeout, clientConfiguration.TimeoutIMillisekunder);
                Assert.Equal(senderUnitTestCertificate, clientConfiguration.Avsendersertifikat);
            }
예제 #3
0
            public void Initializes_fields()
            {
                //Arrange
                var requestXmlDocument            = XmlResource.Request.GetPerson();
                var responseXmlDocument           = XmlResource.Response.GetPerson();
                var senderUnitTestCertificate     = DomainUtility.GetSenderSelfSignedCertificate();
                var oppslagstjenesteConfiguration = new OppslagstjenesteKonfigurasjon(Miljø.FunksjoneltTestmiljøVerifikasjon1, senderUnitTestCertificate);

                var responseContainer = new ResponseContainer(responseXmlDocument);

                //Act
                var oppslagstjenesteValidator = new OppslagstjenesteValidator(requestXmlDocument, responseContainer, oppslagstjenesteConfiguration);

                //Assert
                Assert.Equal(requestXmlDocument, oppslagstjenesteValidator.SentDocument);
                Assert.Equal(responseXmlDocument, responseContainer.Envelope);
                Assert.Equal(oppslagstjenesteConfiguration.Miljø, oppslagstjenesteValidator.Environment);
            }
        public void Initializes_fields()
        {
            //Arrange
            var          senderUnitTestCertificate = DomainUtility.GetSenderSelfSignedCertificate();
            const string sendOnBehalfOf            = "sendPåVegneAv";

            //Act
            var envelope = new PrintCertificateEnvelope(senderUnitTestCertificate, sendOnBehalfOf);

            //Assert
            Assert.NotNull(envelope.Settings.BinarySecurityId);
            Assert.NotNull(envelope.Settings.BodyId);
            Assert.NotNull(envelope.Settings.TimestampId);
            Assert.Equal(envelope.SendOnBehalfOf, sendOnBehalfOf);
            Assert.Equal(envelope.SenderCertificate, senderUnitTestCertificate);

            Assert.NotNull(envelope.XmlDocument);
        }
예제 #5
0
            public void Initializes_fields()
            {
                //Arrange
                var          senderUnitTestCertificate = DomainUtility.GetSenderSelfSignedCertificate();
                const string sendOnBehalfOf            = "sendPåVegneAv";
                var          persons         = new[] { "12312312312", "32132132132" };
                var          informationNeed = new[] { Informasjonsbehov.Person, Informasjonsbehov.Kontaktinfo };

                //Act
                var envelope = new PersonsEnvelope(senderUnitTestCertificate, sendOnBehalfOf, persons, informationNeed);

                //Assert
                Assert.NotNull(envelope.Settings.BinarySecurityId);
                Assert.NotNull(envelope.Settings.BodyId);
                Assert.NotNull(envelope.Settings.TimestampId);
                Assert.Equal(envelope.PersonId, persons);
                Assert.Equal(envelope.InformationNeeds, informationNeed);
                Assert.Equal(envelope.SendOnBehalfOf, sendOnBehalfOf);
                Assert.Equal(envelope.SenderCertificate, senderUnitTestCertificate);

                Assert.NotNull(envelope.XmlDocument);
            }
            public void Initializes_fields()
            {
                //Arrange
                var senderUnitTestCertificate = DomainUtility.GetSenderSelfSignedCertificate();

                const string sendOnBehalfOf   = "sendPåVegneAv";
                const int    fromChangeNumber = 0;
                var          informationNeed  = new[] { Informasjonsbehov.Person, Informasjonsbehov.Kontaktinfo };

                //Act
                var envelope = new EndringerEnvelope(senderUnitTestCertificate, sendOnBehalfOf, fromChangeNumber, informationNeed);

                //Assert
                Assert.NotNull(envelope.Settings.BinarySecurityId);
                Assert.NotNull(envelope.Settings.BodyId);
                Assert.NotNull(envelope.Settings.TimestampId);
                Assert.Equal(envelope.FraEndringsNummer, fromChangeNumber);
                Assert.Equal(envelope.Informasjonsbehov, informationNeed);
                Assert.Equal(envelope.SendOnBehalfOf, sendOnBehalfOf);
                Assert.Equal(envelope.SenderCertificate, senderUnitTestCertificate);

                Assert.NotNull(envelope.XmlDocument);
            }