public void test_merge_to_restore_remove() { Guid note_guid = Guid.NewGuid(); ActionNoteRestore restore_action = new ActionNoteRestore(note_guid); List <EntryAction> actions = new List <EntryAction>() { restore_action }; ActionNoteRemove remove_action = new ActionNoteRemove(note_guid); remove_action.merge_to(actions); Assert.AreEqual(actions.Count, 0); }
public void test_merge_to_update_remove() { Guid note_guid = Guid.NewGuid(); ActionNoteUpdate update_action = new ActionNoteUpdate(note_guid, "Some note", "Some updated note", null); List <EntryAction> actions = new List <EntryAction>() { update_action }; ActionNoteRemove remove_action = new ActionNoteRemove(note_guid); remove_action.merge_to(actions); Assert.AreEqual(actions.Count, 1); Assert.IsTrue(ReferenceEquals(actions[0], remove_action)); }
public void test_merge_to_create_remove() { Guid note_guid = Guid.NewGuid(); Note note = new Note("Some note", Guid.NewGuid()); ActionNoteCreate create_action = new ActionNoteCreate(note_guid, note); List <EntryAction> actions = new List <EntryAction>() { create_action }; ActionNoteRemove remove_action = new ActionNoteRemove(note_guid); remove_action.merge_to(actions); Assert.AreEqual(actions.Count, 0); }