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"); }
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)); } }
public void InvalidData() { DomainObjectTransporterTestHelper.Import(new byte[] { 1, 2, 3 }); }