public void CommandAttemptsToCreateKeyWithAlreadyExistingKey() { createRSAKey(); createKey.setCommand(START_OF_COMMAND_CREATE + KEY_NAME + END_OF_COMMAND); Assert.AreEqual(true, createKey.verifyCommand()); Assert.AreEqual("\nThis key already exists: " + KEY_NAME, createKey.action()); }
public void createRSAKey() { createKey.setCommand(CommandRSATest.START_OF_COMMAND_CREATE + CommandRSATest.KEY_NAME + CommandRSATest.END_OF_COMMAND); Assert.AreEqual(true, createKey.verifyCommand()); Assert.AreEqual(CommandRSATest.KEY_CREATION_MESSAGE + CommandRSATest.KEY_NAME, createKey.action()); }
public void CommandListKeyWithTwoKey() { string keyName = "KeyOther"; createRSAKey(); CreateKey createKey = new CreateKey(); createKey.setCommand(START_OF_COMMAND_CREATE + keyName + END_OF_COMMAND); Assert.AreEqual(true, createKey.verifyCommand()); Assert.AreEqual(KEY_CREATION_MESSAGE + keyName, createKey.action()); ListKey listKey = new ListKey(); listKey.setCommand("RSA LIST"); Assert.AreEqual(true, listKey.verifyCommand()); Assert.AreEqual("\nKeys: " + "\n" + KEY_NAME + "\n" + keyName, listKey.action()); }