public void TestGetByEmail() { Tourist testTourist = new Tourist() { Id = 1, Name = "Pepe", LastName = "Lopez", Email = "*****@*****.**", Bookings = null, }; List <Tourist> touristList = new List <Tourist>() { new Tourist() { Id = 2, Name = "Pepe", LastName = "Lopez", Email = "*****@*****.**", Bookings = null, }, testTourist }; touristList.ForEach(s => _context.Add(s)); _context.SaveChanges(); var repository = new TouristRepository(_context); var result = repository.GetByEmail("*****@*****.**"); Assert.IsTrue(testTourist.Equals(result)); }
public void TestEqualsExpectedTrue() { tourist.Id = 1; tourist.Email = "*****@*****.**"; Tourist test = new Tourist { Id = 1, Email = "*****@*****.**" }; Assert.IsTrue(tourist.Equals(test)); }