Example #1
0
        public void RelatedObjectChanges_NonExistentObject_RealSide()
        {
            byte[] binaryData = DomainObjectTransporterTestHelper.GetBinaryDataFor(DomainObjectIDs.Computer1);
            ModifyDatabase(() => DomainObjectIDs.Computer1.GetObject <Computer> ().Employee.Delete());

            DomainObjectTransporterTestHelper.Import(binaryData);

            Assert.Fail("Expected exception");
        }
Example #2
0
        public void NonEmptyTransport_ObjectsBoundToTransaction()
        {
            var loadedIDs = new[] { DomainObjectIDs.Order1, DomainObjectIDs.Order3, DomainObjectIDs.Company1 };
            var data      = DomainObjectTransporterTestHelper.GetBinaryDataFor(loadedIDs);

            TransportedDomainObjects transportedObjects = DomainObjectTransporterTestHelper.Import(data);

            foreach (DomainObject domainObject in transportedObjects.TransportedObjects)
            {
                Assert.That(domainObject.RootTransaction, Is.SameAs(transportedObjects.DataTransaction));
            }
        }
Example #3
0
 public void InvalidData()
 {
     DomainObjectTransporterTestHelper.Import(new byte[] { 1, 2, 3 });
 }