Ejemplo n.º 1
0
        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.");
        }
Ejemplo n.º 2
0
        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.");
        }
Ejemplo n.º 3
0
        public void ExecuteRemove_PasswordIsEmpty()
        {
            var vm = new FtpPasswordViewModel();

            vm.FtpPassword = "******";

            vm.RemoveCommand.Execute(null);
            Assert.AreEqual("", vm.FtpPassword);
        }
Ejemplo n.º 4
0
        public void ExecuteOk_PasswordIsSettedPassword()
        {
            var vm = new FtpPasswordViewModel();

            vm.FtpPassword = "******";

            vm.OkCommand.Execute(null);
            Assert.AreEqual("FtpPassword", vm.FtpPassword);
        }
Ejemplo n.º 5
0
        public void CheckDialogResultInCloseActionForRemoveCommand()
        {
            var vm = new FtpPasswordViewModel();

            vm.FtpPassword     = "******";
            vm.CloseViewAction = CloseAction;

            vm.RemoveCommand.Execute(null);
            Assert.AreEqual(true, _closeDialogResult, "Wrong DialogResult for RemoveCommand");
        }
Ejemplo n.º 6
0
        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.");
        }
Ejemplo n.º 7
0
        public void InitTest()
        {
            var vm = new FtpPasswordViewModel();

            Assert.AreEqual(FtpPasswordResponse.Cancel, vm.Response, "Initial Response is not Cancel");
        }