public void ReturnsProperBytesCount()
            {
                //Arrange
                var forsendelse = DomainUtility.GetDigitalDigitalPostWithNotificationMultipleDocumentsAndHigherSecurity();

                var manifest = new Manifest(forsendelse);
                var cryptographicCertificate = forsendelse.PostInfo.Mottaker.Sertifikat;
                var signature = new Signature(forsendelse, manifest, DomainUtility.GetAvsenderCertificate());

                var asiceAttachables = new List <IAsiceAttachable>();

                asiceAttachables.AddRange(forsendelse.Dokumentpakke.Vedlegg);
                asiceAttachables.Add(forsendelse.Dokumentpakke.Hoveddokument);
                asiceAttachables.Add(manifest);
                asiceAttachables.Add(signature);

                var asiceArchive = new AsiceArchive(cryptographicCertificate, new GuidUtility(), new List <AsiceAttachableProcessor>(), asiceAttachables.ToArray());

                var expectedBytesCount = 0L;

                foreach (var dokument in asiceAttachables)
                {
                    expectedBytesCount += dokument.Bytes.Length;
                }

                //Act
                var actualBytesCount = asiceArchive.UnzippedContentBytesCount;

                //Assert
                Assert.Equal(expectedBytesCount, actualBytesCount);
            }
            public void InitializesFieldsProperly()
            {
                //Arrange
                var forsendelse = DomainUtility.GetDigitalDigitalPostWithNotificationMultipleDocumentsAndHigherSecurity();

                var manifest = new Manifest(forsendelse);
                var cryptographicCertificate = forsendelse.PostInfo.Mottaker.Sertifikat;
                var signature = new Signature(forsendelse, manifest, DomainUtility.GetAvsenderCertificate());

                var asiceAttachables = new List <IAsiceAttachable>();

                asiceAttachables.AddRange(forsendelse.Dokumentpakke.Vedlegg);
                asiceAttachables.Add(forsendelse.Dokumentpakke.Hoveddokument);
                asiceAttachables.Add(manifest);
                asiceAttachables.Add(signature);

                var asiceAttachablesArray = asiceAttachables.ToArray();

                var asiceAttachableProcessors = new List <AsiceAttachableProcessor>();

                //Act
                var asiceArchive = new AsiceArchive(cryptographicCertificate, new GuidUtility(), asiceAttachableProcessors, asiceAttachablesArray);

                //Assert
                Assert.Equal(asiceAttachableProcessors, asiceArchive.AsiceAttachableProcessors);
                Assert.Equal(asiceAttachablesArray, asiceArchive.AsiceAttachables);
            }
        public SmokeTestsHelper Create_Digital_Forsendelse_with_multiple_documents()
        {
            _forsendelse = DomainUtility.GetDigitalDigitalPostWithNotificationMultipleDocumentsAndHigherSecurity(3);

            return(this);
        }