Inheritance: IModelChange
Exemplo n.º 1
0
 public void SerializeChangeTransaction()
 {
     var sourceChange = new ElementDeletion(uri);
     var nestedChanges = new[] { new ListDeletion(uri, property, 0, 1) };
     var change = new ChangeTransaction(sourceChange, nestedChanges);
     SerializeAndAssert(change);
 }
Exemplo n.º 2
0
        public void ApplyElementDeletion()
        {
            var toDelete = railway.Semaphores[0];
            var change = new ElementDeletion(toDelete.AbsoluteUri);

            change.Apply(repository);

            CollectionAssert.DoesNotContain(railway.Semaphores.ToArray(), toDelete);
        }
Exemplo n.º 3
0
        public void RecordElementDeletion()
        {
            var toDelete = railway.Routes[0];
            var expected = new ElementDeletion(toDelete.AbsoluteUri);
            var rec = new ModelChangeRecorder();
            rec.Start(railway);

            toDelete.Delete();

            var actual = ((ChangeTransaction)rec.GetModelChanges().Changes[0]).SourceChange;
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 4
0
 public void SerializeElementDeletion()
 {
     var change = new ElementDeletion(uri);
     SerializeAndAssert(change);
 }