public void EncryptingAndDecryptingConfigSectionSucceeds() { // Arrange var sut = new ConfigSectionManager(exePath); // Act sut.Encrypt(sectionName); // Assert sut.Decrypt(sectionName); }
public void EncryptingAndGettingEncryptedConfigSectionSucceeds() { // Arrange var sut = new ConfigSectionManager(exePath); // Act sut.Encrypt(sectionName); var result = sut.Get(sectionName); sut.Decrypt(sectionName); // Assert Assert.IsInstanceOfType(result, typeof(AppclusiveCredentialSection)); var appclusiveCredentialSection = result as AppclusiveCredentialSection; Assert.IsNotNull(appclusiveCredentialSection); Assert.IsFalse(string.IsNullOrWhiteSpace(appclusiveCredentialSection.Domain)); }