/// <summary>
 /// removes existing proejcts from teh database so we can count the projects correctly
 /// </summary>
 /// <param name="userID"></param>
 private void removeExistingProjectsFromUser(int userID)
 {
     var projects = new ProjectRepository();
     var ownedProjects = projects.FindProjectsOwnedByUser(userID);
     foreach (var project in ownedProjects)
     {
         var foundProject = projects.FindProjectByID(project.ID);
         projects.Delete(foundProject);
     }
 }
        public void ProjectRepository_FindProjectsOwnedByUser_ShouldReturnAllOwedProjectsOfUser()
        {
            removeExistingProjectsFromUser(1);
            removeExistingProjectsFromUser(2);

            var project = new ProjectRepository();
            project.Create(createTestProject(1));
            project.Create(createTestProject(2));
            project.Create(createTestProject(1));

            var ownedProjects = project.FindProjectsOwnedByUser(1);
            Assert.AreEqual(2, ownedProjects.Count());

            ownedProjects = project.FindProjectsOwnedByUser(2);
            Assert.AreEqual(1, ownedProjects.Count());
        }