public void edit_table_correctly(EditTableCommand command) { Execute(command); Assert.Equal(command.Title, Edited.Title); Assert.Equal(command.Description, Edited.Description); }
private void Execute() { var command = new EditTableCommand() { Title = "Title1", Description = "Description1" }; Execute(command); }
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); }
public void edit_login_with_edit_table_correctly(EditTableCommand command) { Execute(command); Assert.Equal(command.Title, EditedUser.Login); }