public void FeilDokumentpakkeIdITransportkvitteringSkalKasteSecurityException()
            {
                //Arrange
                const string dokumentPakkeIdRequest =
                    "*****@*****.**";
                const string dokumentPakkeIdRespons =
                    "*****@*****.**";

                AddRsaSha256AlgorithmToCryptoConfig();

                var miljø = Miljø.FunksjoneltTestmiljø;
                var sendtMeldingXmlDocument =
                    XmlUtility.TilXmlDokument(SendtMelding.FunksjoneltTestMiljøMedInput());

                var mottattTransportKvittering =
                    XmlUtility.TilXmlDokument(
                        TransportKvittering.TransportOkKvittertingFunksjoneltTestmiljøMedInput(dokumentPakkeIdRespons));
                var responsvalidator = new Responsvalidator(sendtMeldingXmlDocument,
                                                            mottattTransportKvittering, miljø.Sertifikatkjedevalidator);

                var guidUtility = new GuidUtility
                {
                    BinarySecurityTokenId = "X509-513ffecb-cd7e-4bb3-a4c5-47eff314683f",
                    BodyId          = "soapBody",
                    DokumentpakkeId = dokumentPakkeIdRequest,
                    EbMessagingId   = "id-68ae7123-bf5c-4d15-835c-4a6b91106e77",
                    StandardBusinessDocumentHeaderId = "388214db-29cc-43c7-9543-877e017e5bb4",
                    TimestampId = "TS-76740c34-88d2-4bb6-82d2-9e9f0e474087"
                };

                //Act
                responsvalidator.ValiderTransportkvittering(guidUtility);

                //Assert
            }
            public void FeilSecurityBinaryITransportKvitteringSkalKasteException()
            {
                //Arrange
                AddRsaSha256AlgorithmToCryptoConfig();

                //h i slutten er byttet ut med b
                const string korruptSecurityBinaryIRespons =
                    "MIIE7jCCA9agAwIBAgIKGBj1bv99Jpi+EzANBgkqhkiG9w0BAQsFADBRMQswCQYDVQQGEwJOTzEdMBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxIzAhBgNVBAMMGkJ1eXBhc3MgQ2xhc3MgMyBUZXN0NCBDQSAzMB4XDTE0MDQyNDEyMzExMVoXDTE3MDQyNDIxNTkwMFowVTELMAkGA1UEBhMCTk8xGDAWBgNVBAoMD1BPU1RFTiBOT1JHRSBBUzEYMBYGA1UEAwwP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EBCwUAA4IBAQCmMpAGaNplOgx3b4Qq6FLEcpnMOnPlSWBC7pQEDWx6OtNUHDm56fBoyVQYKR6LuGfalnnOKuB/sGSmO3eYlh7uDK9WA7bsNU/W8ZiwYwF6PBRui2rrqYk3kj4NLTNlyh/AOO1a2FDFHu369W0zcjj5ns7qs0K3peXtLX8pVxA8RmjwdGe69P/2r6s2A5CBj7oXZJD0Yo2dJFdsZzonT900sUi+MWzlhj3LxU5/684NWc2NI6ZPof/dyYpy3K/AFzpDLWGSmaDO66hPl7EfoJxEiX0DNBaQzNIyRFPh0ir0jM+32ZQ4goR8bAtyhKeTyA/4+Qx1WQXS3wURCC0lsbMb";

                var miljø = Miljø.FunksjoneltTestmiljø;
                var sendtMeldingXmlDocument = XmlUtility.TilXmlDokument(SendtMelding.FunksjoneltTestMiljøMedInput());

                var mottattTransportKvittering =
                    XmlUtility.TilXmlDokument(
                        TransportKvittering.TransportOkKvittertingFunksjoneltTestmiljøMedInput(
                            securityBinary: korruptSecurityBinaryIRespons));
                var responsvalidator = new Responsvalidator(sendtMeldingXmlDocument,
                                                            mottattTransportKvittering, miljø.Sertifikatkjedevalidator);
                var guidUtility = new GuidUtility
                {
                    BinarySecurityTokenId = "X509-513ffecb-cd7e-4bb3-a4c5-47eff314683f",
                    BodyId          = "soapBody",
                    DokumentpakkeId = "*****@*****.**",
                    EbMessagingId   = "id-68ae7123-bf5c-4d15-835c-4a6b91106e77",
                    StandardBusinessDocumentHeaderId = "388214db-29cc-43c7-9543-877e017e5bb4",
                    TimestampId = "TS-76740c34-88d2-4bb6-82d2-9e9f0e474087"
                };

                //Act
                responsvalidator.ValiderTransportkvittering(guidUtility);

                //Assert
            }