public void Delete_FamilyEvent_Test()
        {
            // Arrange
            var familyEvent = new FamilyEvent();
            var service = _familyFamilyEventService;

            // Act
            service.Add(familyEvent);
            service.Delete(familyEvent.Id.ToString());

            // Assert
            Assert.Equal(null, service.Get(familyEvent.Id.ToString()));
        }
        public void Get_Add_FamilyEvent_Test()
        {
            // Arrange
            var familyEvent = new FamilyEvent();
            var service = _familyFamilyEventService;

            // Act
            var result = service.Add(familyEvent);

            // Assert
            Assert.NotNull(result.Id);
            Assert.Equal((Entity)familyEvent, service.Get(familyEvent.Id.ToString()));
        }
        public void Get_By_PersonId_Test_doesnt_return()
        {
            // Arrange
            var familyEventId = ObjectId.GenerateNewId();
            var personId = ObjectId.GenerateNewId();
            var familyEvent = new FamilyEvent()
            {
                Id = familyEventId,
                PersonRoles =
                    new List<FamilyEvent.PersonRole>
                    {
                        new FamilyEvent.PersonRole {PersonId = personId, Role = "Husband"}
                    }
            };
            var service = _familyFamilyEventService;

            // Act
            service.Add(familyEvent);
            var result = service.GetByPersonId(ObjectId.GenerateNewId().ToString());

            // Assert
            Assert.False(result.Any(r => r.Id == familyEventId));
        }
        public void Update_FamilyEvent_Test()
        {
            // Arrange
            var familyEvent = new FamilyEvent { Notes = "Birth" };
            var service = _familyFamilyEventService;

            // Act
            service.Add(familyEvent);
            familyEvent.Notes = "birth";
            service.Update(familyEvent);

            // Assert
            Assert.Equal("birth", service.Get(familyEvent.Id.ToString()).Notes);
            Assert.NotEqual("Birth", service.Get(familyEvent.Id.ToString()).Notes);
        }