public void BoardRepositoryEnsureICanGetAllBoards() { /* Begin Arrange */ // 1. Your data must be Queryable // 2. Mocks can only cast to an Interface (e.g. IQueryable, IDbSet, etc). // 3. You must ensure Provider, GetEnumerator(), ElementType, and Expression are defined // with your collection class (the container class that holds your data). my_list.Add(new Board { Title = "Tim's Board", Owner = owner }); my_list.Add(new Board { Title = "Sally's Board", Owner = owner }); ConnectMocksToDataSource(); BoardRepository board_repo = new BoardRepository(mock_context.Object); /* End Arrange */ /* Begin Act */ List<Board> boards = board_repo.GetAllBoards(); /* End Act */ /* Begin Assert */ Assert.AreEqual(2, boards.Count); /* End Assert */ }