public void Validate_ValidSignedXml_NotThrows(string exampleXmlFileName, string elementId)
        {
            var data    = NUnitTestHelper.GetInputFile(exampleXmlFileName);
            var service = new GostXadesBesService();

            service.ValidateSignature(data, elementId);
        }
        public void Validate_InvalidSignedXml_ThrowsInvalidOperationException(string exampleXmlFileName, string elementId, string expectedExceptionMessage)
        {
            var data    = NUnitTestHelper.GetInputFile(exampleXmlFileName);
            var service = new GostXadesBesService();
            var ex      = Assert.Throws <InvalidOperationException>(() => service.ValidateSignature(data, elementId));

            Assert.AreEqual(expectedExceptionMessage, ex.Message);
        }
        public void Sign_ValidXml_NotThrows(string exampleXmlFileName, string elementId)
        {
            var data    = NUnitTestHelper.GetInputFile(exampleXmlFileName);
            var service = new GostXadesBesService();

            var signedData = service.Sign(data, elementId, CertificateThumbprint, CertificatePassword);

            service.ValidateSignature(signedData, elementId);
        }