public void ShouldGetOneVenue() { // Arrange var allEntities = GetAllEntites(); _venueRepository.Setup(repo => repo.Get(3)) .Returns(allEntities.First(e => e.Id == 3)); // Act var venue = _venueService.GetById(3); // Assert Assert.AreEqual(3, venue.Id); Assert.AreEqual("Test Venue 3", venue.Name); }
public void Update_With_Correct_Venue() { //Arrange var venueDTO = new VenueDTO { Name = "test", Description = "test", Address = "asd", Phone = "123" }; //Act service.Create(venueDTO); var venueDTOForUpdate = new VenueDTO { Id = 0, Name = "update", Description = "update", Address = "rrr", Phone = "1234" }; service.Update(venueDTOForUpdate); //Assert Assert.AreEqual(service.GetById(0).Name, "update"); }
public void GetById() { //Assert Assert.AreEqual(service.GetById(1).Name, "Arena"); }