public void GettingApplyCommand__ReturnsDoNowCommand()
        {
            var doNowCommand = new DoNowCommand();

            var test = new DoNowPresenter(doNowCommand);

            Assert.Same(doNowCommand, test.ApplyCommand);
        }
        public void Execute__MarksActionAsCompleted()
        {
            DateTime timeAtStart = DateTime.UtcNow;
            Mock<IAction> mockAction = AnAction.Mock();

            var test = new DoNowCommand();
            test.Execute(mockAction.Object);

            mockAction.VerifySet(x => x.CompletedDate = It.IsInRange(timeAtStart, DateTime.UtcNow, Range.Inclusive));
        }
Ejemplo n.º 3
0
 public DoNowPresenter(DoNowCommand applyCommand)
 {
     ApplyCommand = applyCommand;
 }