Exemple #1
0
        public void edit_table_correctly(EditTableCommand command)
        {
            Execute(command);

            Assert.Equal(command.Title, Edited.Title);
            Assert.Equal(command.Description, Edited.Description);
        }
Exemple #2
0
        private void Execute()
        {
            var command = new EditTableCommand()
            {
                Title = "Title1", Description = "Description1"
            };

            Execute(command);
        }
Exemple #3
0
        private void Execute(EditTableCommand command)
        {
            if (!_blockMock)
            {
                UnitOfWorkMock.Get <Table>(Arg.Any <int>()).Returns(Edited);
                UnitOfWorkMock.Add(Arg.Any <Type>(), Arg.Any <Table>()).Returns(Edited);
                UnitOfWorkMock.Add(Arg.Any <Type>(), Arg.Any <User>()).Returns(EditedUser);
            }
            var handler = new EditTableHandler()
            {
                UnitOfWork = UnitOfWorkMock
            };

            handler.Handle(command);
        }
Exemple #4
0
        public void edit_login_with_edit_table_correctly(EditTableCommand command)
        {
            Execute(command);

            Assert.Equal(command.Title, EditedUser.Login);
        }