public void AdvertisementsList_CanBeRetrieved() { context.Advertisements.Add(new Advertisement { Name = "Advertisement1", Description = "An advertisement for a job.", Active = true, JobPositionId = this.jobPositionId }); context.Advertisements.Add(new Advertisement { Name = "Advertisement2", Description = "An advertisement for a job.", Active = true, JobPositionId = this.jobPositionId }); context.SaveChanges(); var service = new AdvertisementService(context); var advertisements = service.GetAdvertisementsList(); Assert.AreEqual(2, advertisements.Count); }