public MainWindow() { InitializeComponent(); Loaded += MainWindow_Loaded; _userRepository = new UserRepository(); _toDoListRepsitory = new ToDoListRepsitory(); _toDoListItemRepository = new ToDoListItemRepository(); }
public NewListAdding(int id) { InitializeComponent(); Loaded += NewListAdding_Loaded; _userRepository = new UserRepository(); _toDoListRepsitory = new ToDoListRepsitory(); _toDoListItemRepository = new ToDoListItemRepository(); userId = id; }
public ToDoListItems(int selectedListId, int selectedUserId) { InitializeComponent(); Loaded += ToDoLists_Loaded; _userRepository = new UserRepository(); _toDoListRepsitory = new ToDoListRepsitory(); _toDoListItemRepository = new ToDoListItemRepository(); listId = selectedListId; userId = selectedUserId; }
public async Task Create() { string dbFileName = GetTestDbFileName(); var context = GetTestContext(dbFileName); ToDoListItemRepository repository = new ToDoListItemRepository(context); var createResult = await repository.CreateToDoListItemAsync("This is a test description"); Assert.Equal(1, createResult.Id); Assert.Equal("This is a test description", createResult.Description); Assert.False(createResult.IsCompleted); Assert.False(createResult.IsDeleted); DeleteTestDbFile(dbFileName); }
public NewItemAdding(int id) { InitializeComponent(); _toDoListItemRepository = new ToDoListItemRepository(); listId = id; }