We're updating the issue view to help you get more done. 

Integration tests for custom LINQ queries

Description

  • Add a new "CustomProjectionIntegrationTest" to the DomainObjects\Core\Linq\IntegrationTests namespace.

  • Add the following tests:

    • Query that selects a sequence of DomainObject properties (e.g., select o.OrderNumber).

    • Query that selects a sequence of DomainObject IDs (e.g., select o.ID). Expect a NotSupportedException with a message explaining that one should create the ObjectID in memory. (The exact message can be added later, when the implementation works.)

    • Query that selects a sequence of ObjectIDs constructed in memory (e.g., select new ObjectID (o.ID.ClassID, o.ID.Value)).

    • Query that selects a complex projection (e.g., new { o.OrderNumber, o.OrderDate, new { o.OrderTicket.FileName, o.OrderItems.Count() }).

    • Query that selects a complex projection containing a DomainObject (new { o.OrderNumber, o }). Expect a NotSupportedException with a message explaining that one cannot include a DomainObject in a complex projection. (The exact message can be added later, when the implementation works.)

  • Add a test to DomainObjects\Core\IntegrationTests\Queries\Linq...Test that proves that LINQ queries with custom projections execute the IClientTransactionExtension.FilterCustomQueryResult notification.

    • Also refactor the existing test for collection queries to test against IClientTransactionExtension, not IClientTransactionListener.

Assignee

Fabian Schmied

Reporter

Fabian Schmied

Labels

None

Time tracking

2h

Components

Fix versions

Priority

Normal
Configure