public void InsertEvent_WithGivenEvent_ShouldBeAbleToFindEvent()
        {
            //Arrange
            Event eventToBeInserted = new Event()
            {
                DateCreated = new DateTime(2020, 12, 6),
                Description = "I've used the bathroom",
                UserName    = "******"
            };

            //Act
            _eventsAccessor.InsertEvent(eventToBeInserted);
            Event foundEvent = this.FindEventWithDescription(eventToBeInserted.Description);

            //Assert
            Assert.That(foundEvent.DateCreated, Is.EqualTo(eventToBeInserted.DateCreated));
            Assert.That(foundEvent.Description, Is.EqualTo(eventToBeInserted.Description));
            Assert.That(foundEvent.UserName, Is.EqualTo(eventToBeInserted.UserName));

            //TearDown
            _eventsAccessor.DeleteEvent(foundEvent);
        }
Exemple #2
0
 public void DeleteEvent(Event evnt)
 {
     _eventsAccessor.DeleteEvent(evnt);
 }