public void RelationsFromConcreteSingle()
        {
            TICustomer customer = DomainObjectIDs.Customer.GetObject <TICustomer> ();

            Assert.That(customer.CreatedBy, Is.EqualTo("UnitTests"));
            Assert.That(customer.FirstName, Is.EqualTo("Zaphod"));
            Assert.That(customer.CustomerType, Is.EqualTo(CustomerType.Premium));

            TIRegion region = customer.Region;

            Assert.That(region, Is.Not.Null);
            Assert.That(region.ID, Is.EqualTo(DomainObjectIDs.Region));

            DomainObjectCollection orders = customer.Orders;

            Assert.That(orders.Count, Is.EqualTo(1));
            Assert.That(orders[0].ID, Is.EqualTo(DomainObjectIDs.Order));

            DomainObjectCollection historyEntries = customer.HistoryEntries;

            Assert.That(historyEntries.Count, Is.EqualTo(2));
            Assert.That(historyEntries[0].ID, Is.EqualTo(DomainObjectIDs.HistoryEntry2));
            Assert.That(historyEntries[1].ID, Is.EqualTo(DomainObjectIDs.HistoryEntry1));

            TIClient client = customer.Client;

            Assert.That(client.ID, Is.EqualTo(DomainObjectIDs.Client));

            Assert.That(customer.AbstractClassesWithoutDerivations, Is.Empty);
        }
        public void OneToManyRelationToAbstractClass()
        {
            TIClient client = DomainObjectIDs.Client.GetObject <TIClient> ();

            DomainObjectCollection assignedObjects = client.AssignedObjects;

            Assert.That(assignedObjects.Count, Is.EqualTo(4));
            Assert.That(assignedObjects[0].ID, Is.EqualTo(DomainObjectIDs.OrganizationalUnit));
            Assert.That(assignedObjects[1].ID, Is.EqualTo(DomainObjectIDs.Person));
            Assert.That(assignedObjects[2].ID, Is.EqualTo(DomainObjectIDs.PersonForUnidirectionalRelationTest));
            Assert.That(assignedObjects[3].ID, Is.EqualTo(DomainObjectIDs.Customer));
        }