public void UpdateEventDetailTest() { // Arrange HollywoodTestEntities dataContext = new HollywoodTestEntities(); EventDetailRepository eventDetailRepository = new EventDetailRepository(dataContext); EventDetail eventDetail = new EventDetail() { EventID = 1, EventDetailStatusID = 1, EventDetailName = "Update Event Detail Data Access Unit Test", EventDetailNumber = 1, EventDetailsOdd = 1, FinishingPosition = 1, FirstTimer = true, }; // Act int EventDetailID = eventDetailRepository.Create(eventDetail); eventDetail.EventDetailID = EventDetailID; eventDetail.EventDetailName = "Updated Event Detail Data Access Unit Test"; bool isUpdated = eventDetailRepository.Update(eventDetail); // Assert Assert.IsTrue(isUpdated); }
public void CreateEventDetailTest() { // Arrange HollywoodTestEntities dataContext = new HollywoodTestEntities(); EventDetailRepository eventDetailRepository = new EventDetailRepository(dataContext); EventDetail eventDetail = new EventDetail() { EventID = 1, EventDetailStatusID = 1, EventDetailName = "Create Event Detail Data Access Unit Test", EventDetailNumber = 1, EventDetailsOdd = 1, FinishingPosition = 1, FirstTimer = true, }; // Act int EventDetailID = eventDetailRepository.Create(eventDetail); // Assert Assert.AreNotEqual(EventDetailID, 0); }