コード例 #1
0
        public void should_update_changes_on_server()
        {
            var args = new CompleteTaskArgs();
            const int id = 1;
            var command = new CompleteServiceCommand(todoList){Id = id};

            comConverter.GetServiceCommand(args).Returns(command);

            service.UpdateChanges(args);

            command.ExecuteCommand();
        }
コード例 #2
0
 private void PrintInfo(CompleteTaskArgs completeTaskArgs)
 {
     textWriter.WriteLine("Task ID: {0} completed.", completeTaskArgs.Id);
 }
コード例 #3
0
        public void should_convert_args_to_complete_command()
        {
            var args = new CompleteTaskArgs { Id = 1 };

            var result = (CompleteServiceCommand)converter.GetServiceCommand(args);

            result.Id.Should().Be(1);
        }