public void ComputeState_NoChange_StateDeleted()
        {
            //Arrange
            Photographer       p   = GetPhotographer();
            ChangeTrackerEntry cte = new ChangeTrackerEntry(p, ChangeTrackerEntry.States.Deleted);

            //Act
            p.Name = "othername";
            cte.ComputeState();

            //Assert
            Assert.NotNull(cte.Item);
            Assert.Equal(p, cte.Item);
            Assert.NotNull(cte.Originals);
            Assert.Equal(ChangeTrackerEntry.States.Deleted, cte.State);
            Assert.Equal(p.GetType().GetProperties().Length, cte.Originals.Count);
        }
        public void ComputeState_SetState_StateModified()
        {
            //Arrange
            Photographer       p   = GetPhotographer();
            ChangeTrackerEntry cte = new ChangeTrackerEntry(p);

            //Act
            p.BirthDate = p.BirthDate.AddDays(2);
            cte.ComputeState();

            //Assert
            Assert.NotNull(cte.Item);
            Assert.Equal(p, cte.Item);
            Assert.NotNull(cte.Originals);
            Assert.Equal(ChangeTrackerEntry.States.Modified, cte.State);
            Assert.Equal(p.GetType().GetProperties().Length, cte.Originals.Count);
        }
        public void SetUnmodified_SetsStateToUnmodified_FromModified()
        {
            //Arrange
            Photographer       p   = GetPhotographer();
            ChangeTrackerEntry cte = new ChangeTrackerEntry(p);

            p.BirthDate = p.BirthDate.AddDays(2);
            cte.ComputeState();

            //Act
            cte.SetUnmodified();

            //Assert
            Assert.NotNull(cte.Item);
            Assert.Equal(p, cte.Item);
            Assert.NotNull(cte.Originals);
            Assert.Equal(ChangeTrackerEntry.States.Unmodified, cte.State);
            Assert.Equal(p.GetType().GetProperties().Length, cte.Originals.Count);
            foreach (var pair in cte.Originals)
            {
                Assert.Equal(pair.Item1.GetValue(p), pair.Item2);
            }
        }