public async Task GetContestIdTest() { var context = EssayCompetitionContextInMemoryFactory.InitializeContext(); var seededContest = await this.SeedContestAsync(context); var contestRepository = new EfDeletableEntityRepository <Contest>(context); var essayRepository = new EfDeletableEntityRepository <Essay>(context); var essayTeacherRepository = new EfDeletableEntityRepository <EssayTeacher>(context); var contestantContestRepository = new EfDeletableEntityRepository <ContestantContest>(context); var service = new ContestService(contestRepository, essayRepository, essayTeacherRepository, contestantContestRepository); var resultId = service.GetContestId(seededContest.Name); Assert.True(seededContest.Id == resultId, "GetContestIdTest method does not work correctly"); }