コード例 #1
0
        public void Undo_NoExceptionThrown()
        {
            FakeFile linkTo = new FakeFile("linkTo");
            FakeFile linkFrom = new FakeFile("linkFrom");

            ICommand linkFileCommand = new CreateFileLinkCommand(linkTo, linkFrom);

            Assert.DoesNotThrow(() => linkFileCommand.Undo());
        }
コード例 #2
0
        public void UserFeedback_ValidStringReturned()
        {
            FakeFile linkTo = new FakeFile("linkTo");
            FakeFile linkFrom = new FakeFile("linkFrom");

            ICommand linkFileCommand = new CreateFileLinkCommand(linkTo, linkFrom);

            Assert.IsFalse(String.IsNullOrEmpty(linkFileCommand.UserFeedback));
        }
コード例 #3
0
        public void Execute_ValidPaths_PassedToCommandCorrectly()
        {
            FakeFile linkTo = new FakeFile("linkTo");
            FakeFile linkFrom = new FakeFile("linkFrom");

            ICommand linkFileCommand = new CreateFileLinkCommand(linkTo, linkFrom);

            linkFileCommand.Execute();

            Assert.AreSame("linkTo", linkFrom.FileLinkCreatedAt);
        }