public void Initialize() { _mockRepository = new Mock <IGroupTableRepository>(); _mockUnitOfWork = new Mock <IUnitOfWork>(); _groupService = new GroupTableService(_mockRepository.Object, _mockUnitOfWork.Object); listGroupTable = new List <GroupTable>() { new GroupTable() { ID = 1, Name = "Test 1", IsDelete = false }, new GroupTable() { ID = 2, Name = "Test 2", IsDelete = false }, new GroupTable() { ID = 3, Name = "Test 3", IsDelete = true }, new GroupTable() { ID = 4, Name = "Test 4", IsDelete = false } }; }
/// <summary> /// Khởi tạo /// </summary> /// <param name="tableService"></param> /// <param name="groupTableService"></param> public TableController(ITableService tableService, IGroupTableService groupTableService) { //Create 2 service this.tableService = tableService; this.groupTableService = groupTableService; }
public GroupTableController(IGroupTableService groupTableService) { this.groupTableService = groupTableService; }