Ejemplo n.º 1
0
        public void Given_CandidateRepo_When_GetFormByEmailIsCalled_Then_CorrectCandidateIsReturned()
        {
            RunOnDatabase(async context =>
            {
                //Arrange
                var candidateRepo = new CandidateRepository(context, _loggerFactory);
                var candidate     = new Candidate
                {
                    Approved  = false,
                    CNP       = "12341423523523",
                    Completed = false,
                    Email     = "*****@*****.**",
                    FirstName = "Candi",
                    LastName  = "date",
                    School    = "yes",
                    Subject   = "matematica"
                };

                //Act
                await candidateRepo.AddAsync(candidate);
                var res = await candidateRepo.GetByFormEmail("*****@*****.**");

                //Assert
                res.Email.Should().Be("*****@*****.**");
            });
        }