Object Graph Navigation
Supports object graph navigation to help us access properties inside the domain's objects without having to build fixtures.
We must priviligied an existing method in the fixture. If no method found in the fixture, start searching a matching method under the graph representation of underlying domain objects.
Example
Unable to render embedded object: File (ObjectGraphNavigation-EmployeeNameFirst.png) not found.
| list of |
object graph navigation resolution |
for header |
Employee Name First |
| target |
method name |
| nothing |
EmployeeNameFirst |
| EmployeeName |
First |
| Employee |
NameFirst |
| Employee.Name |
First |
Another case with more depth :
| list of |
object graph navigation resolution |
for header |
a b c d |
| target |
method name |
| nothing |
abcd |
| abc |
d |
| ab |
cd |
| ab.c |
d |
| a |
bcd |
| a.bc |
d |
| a.b |
cd |
| a.b.c |
d |
Example
This example shows the call of all methods involve in resolving the object graph name.
(Class # method)
| rule for |
object graph navigation example fixture |
| object graph |
method name ? |
| employee name first |
Fixture#EmployeeNameFirst |
| thejob title short description |
Fixture#TheJob, Job#TitleShortDescription |
| thejob title long description |
Fixture#TheJob, Job#Title, Title#LongDescription |
| thejob status id |
Fixture#TheJob, Job#Status, Status#Id |
Initial request
Support of OGNL expression inside GreenPepper examples.
Fixtureless
Supports OGNL to help us access properties inside the domain's objects without having to build fixtures.
Example
Given the following class:
I want to be able to access the employe fullName without having to write a method
public string EmployeFullName() {return employe.FullName();} in my fixture.