public void Run_Encrypt_Silent() { //Arrange OutputContainer outputContainer = new OutputContainer(); DummyInfoCollector infoCollector = new DummyInfoCollector(GetAnyFile()); DummyEncryptionService encryptionService = new DummyEncryptionService(); DummySwitchInfo switchInfo = new DummySwitchInfo( CryptoMode.Encrypt, GetAnyFile(), ConsoleMode.Silent ); Application app = new Application(outputContainer, infoCollector, encryptionService, switchInfo); bool expected = true; //Act app.Run(); bool actual = encryptionService.FileEncrypted; //Assert Assert.AreEqual(expected, actual); }
public void Run_Read_ShowConsole() { //Arrange OutputContainer outputContainer = new OutputContainer(); DummyInfoCollector infoCollector = new DummyInfoCollector(GetAnyFile()); DummyEncryptionService encryptionService = new DummyEncryptionService(); DummySwitchInfo switchInfo = new DummySwitchInfo( CryptoMode.Read, GetAnyFile(), ConsoleMode.ShowConsole ); Application app = new Application(outputContainer, infoCollector, encryptionService, switchInfo); bool expected = true; //Act app.Run(); bool actual = outputContainer.StoredMessage != TESTCONTENT; //Assert Assert.AreEqual(expected, actual); }