Exemplo n.º 1
0
        public void Compare_Equal()
        {
            IQueryable <TestDomainObject> expected = from d in QueryFactory.CreateLinqQuery <TestDomainObject>() where d.Value == 1 select d;
            IQueryable <TestDomainObject> actual   = from d in QueryFactory.CreateLinqQuery <TestDomainObject>() where d.Value == 1 select d;

            _queryableComparer.Compare(expected, actual);
        }
Exemplo n.º 2
0
        public void CreateQuery_ForMetadataObject()
        {
            string metadataObjectID = "b8621bc9-9ab3-4524-b1e4-582657d6b420";

            var expected = from m in QueryFactory.CreateLinqQuery <MetadataObject>()
                           where m.MetadataItemID == new Guid(metadataObjectID)
                           select m;

            var actual = _queryBuilder.CreateQuery(metadataObjectID);

            _queryableComparer.Compare(expected, actual);
        }
Exemplo n.º 3
0
        public void Find_GroupsByTenantID()
        {
            var expected = from g in QueryFactory.CreateLinqQuery <Group>()
                           where g.Tenant.ID == _expectedTenantHandle.ObjectID
                           orderby g.Name, g.ShortName
            select g;

            var actual = Group.FindByTenant(_expectedTenantHandle);

            _queryableComparer.Compare(expected, actual);

            Assert.That(actual.Count(), Is.EqualTo(9));
        }