public void Setup() { repositoryFactory = new RepositoryFactory(configString); Assert.NotNull(repositoryFactory); userRepo = repositoryFactory.GetUserRepository(false); Assert.NotNull(userRepo); fileRepo = repositoryFactory.GetFileRepository(false); //Need to use the existing DataContext for this test already setup in UserRepository Assert.NotNull(fileRepo); downloadHistoryRepo = repositoryFactory.GetDownloadHistoryRepository(false); //Need to use the existing DataContext for this test already setup in UserRepository Assert.NotNull(downloadHistoryRepo); mockDownloadHistoryRepo = repositoryFactory.GetDownloadHistoryRepository(true); //This returns a test repo that doesn't hit the database Assert.NotNull(mockDownloadHistoryRepo); }