public void PasswordIsSet_OkIsExecutable_SkipAndRemoveAreExecutable() { var vm = new FtpPasswordViewModel(); vm.FtpPassword = "******"; Assert.IsTrue(vm.OkCommand.IsExecutable, "OkCommand not executable."); Assert.IsTrue(vm.SkipCommand.IsExecutable, "SkipCommand is not executable."); Assert.IsTrue(vm.RemoveCommand.IsExecutable, "RemoveCommand is not executable."); }
public void PasswordIsNull_OkIsNotExecutable_SkipAndRemoveAreExecutable() { var vm = new FtpPasswordViewModel(); vm.FtpPassword = null; Assert.IsFalse(vm.OkCommand.IsExecutable, "OkCommand should not be executable."); Assert.IsTrue(vm.SkipCommand.IsExecutable, "SkipCommand is not executable."); Assert.IsTrue(vm.RemoveCommand.IsExecutable, "RemoveCommand is not executable."); }
public void ExecuteRemove_PasswordIsEmpty() { var vm = new FtpPasswordViewModel(); vm.FtpPassword = "******"; vm.RemoveCommand.Execute(null); Assert.AreEqual("", vm.FtpPassword); }
public void ExecuteOk_PasswordIsSettedPassword() { var vm = new FtpPasswordViewModel(); vm.FtpPassword = "******"; vm.OkCommand.Execute(null); Assert.AreEqual("FtpPassword", vm.FtpPassword); }
public void CheckDialogResultInCloseActionForRemoveCommand() { var vm = new FtpPasswordViewModel(); vm.FtpPassword = "******"; vm.CloseViewAction = CloseAction; vm.RemoveCommand.Execute(null); Assert.AreEqual(true, _closeDialogResult, "Wrong DialogResult for RemoveCommand"); }
public void CheckResponses() { var vm = new FtpPasswordViewModel(); vm.FtpPassword = "******"; vm.OkCommand.Execute(null); Assert.AreEqual(FtpPasswordResponse.OK, vm.Response, "Wrong Response for OkCommand."); vm.RemoveCommand.Execute(null); Assert.AreEqual(FtpPasswordResponse.Remove, vm.Response, "Wrong Response for RemoveCommand."); vm.SkipCommand.Execute(null); Assert.AreEqual(FtpPasswordResponse.Skip, vm.Response, "Wrong Response for SkipCommand."); }
public void InitTest() { var vm = new FtpPasswordViewModel(); Assert.AreEqual(FtpPasswordResponse.Cancel, vm.Response, "Initial Response is not Cancel"); }