public void TestEmptyPasswordParameterException() { IConfigCommand command = new ConfigCommand() { Command = new Command() { CommandType = CommandType.ConnectionQuery } }; command.Encrypt(""); }
public void TestCommandNulledAfterEncryption() { IConfigCommand command = new ConfigCommand() { Command = new Command() { CommandType = CommandType.ConnectionQuery } }; command.Encrypt(TestEncrypt.Password); Assert.IsNull(command.Command); }
public void TestEncryptedCanBeDecryptedInMemory() { IConfigCommand command = new ConfigCommand() { Command = new Command() { CommandType = CommandType.ConnectionQuery } }; command.Encrypt(TestEncrypt.Password); Assert.IsNull(command.Command); command.Decrypt(TestEncrypt.Password); Assert.IsNotNull(command.Command); }
public void TestEncryptedCanBeDecryptedInMemoryIntegrityWithComplexPassword() { const string password = "******"; IConfigCommand command = new ConfigCommand() { Command = new Command() { CommandType = CommandType.ConnectionQuery } }; command.Encrypt(password); Assert.IsNull(command.Command); command.Decrypt(password); Assert.AreEqual(CommandType.ConnectionQuery.ToString(), command.Command.Name); }
public void TestEncryptedCanBeDecryptedInMemoryIntegrity() { IConfigCommand command = new ConfigCommand() { Command = new Command() { CommandType = CommandType.ConnectionQuery } }; command.Encrypt(TestEncrypt.Password); Assert.IsNull(command.Command); command.Decrypt(TestEncrypt.Password); Assert.AreEqual(CommandType.ConnectionQuery.ToString(), command.Command.Name); }