public void MakeSavePoint()
        {
            var savePointer = new WordSavePointer(this.CreateWord());

            savePointer.MakeSavePoint();

            Assert.IsTrue(savePointer.IsSavePoint);
        }
        public void DeleteSavePoint()
        {
            var savePointer = new WordSavePointer(this.CreateWord());

            savePointer.MakeSavePoint();
            savePointer.DeleteSavePoint();

            Assert.IsFalse(savePointer.IsSavePoint);
        }
        public void Rollback()
        {
            var savePointer = new WordSavePointer(this.CreateWord());
            var expected = savePointer.Entity.Spelling;

            savePointer.MakeSavePoint();
            savePointer.Entity.Spelling = "xxx";
            savePointer.RollbackToSavePoint();

            Assert.AreEqual(expected, savePointer.Entity.Spelling);
        }
        public void Copy()
        {
            var savePointer = new WordSavePointer(this.CreateWord());
            var actual = new Word();
            var expected = savePointer.Entity;

            savePointer.CopyTo(savePointer.Entity, actual);

            Assert.AreEqual(expected.ID, actual.ID);
            Assert.AreEqual(expected.Language, actual.Language);
            Assert.AreEqual(expected.Spelling, actual.Spelling);
            Assert.AreEqual(expected.UsingFrequencyNumber, actual.UsingFrequencyNumber);

            Assert.AreEqual(expected.Phrases.Count, actual.Phrases.Count);
            Assert.AreEqual(expected.Phrases[0], actual.Phrases[0]);

            Assert.AreEqual(expected.Translations.Count, actual.Translations.Count);
            Assert.AreEqual(expected.Translations[0].ID, actual.Translations[0].ID);
            Assert.AreEqual(expected.Translations[1].ID, actual.Translations[1].ID);
        }
        public void IsNotSavePoint()
        {
            var savePointer = new WordSavePointer(this.CreateWord());

            Assert.IsFalse(savePointer.IsSavePoint);
        }