예제 #1
0
        public void LoadFromXmlFile_Should_LoadThePublicKeyFromFile()
        {
            // Arrange
            var file = $"{_assemblyPath}publicKey.xml";

            // Act
            var key = RsaPublicKey.LoadFromXmlFile(file);

            // Assert
            Assert.Equal("AQAB", key.Exponent);
        }
예제 #2
0
 public void LoadFromXmlFile_Should_ThrowException_When_FileDoesNotExists()
 {
     // Assert
     Assert.Throws <ArgumentException>(()
                                       => RsaPublicKey.LoadFromXmlFile($"{_assemblyPath}nonexist.xml"));
 }