public void GenerateQueryNodeShouldWorkIfPropertyIsPrimitiveCollection() { var property = HardCodedTestModel.GetDogNicknamesProperty(); EntityRangeVariable rangeVariable = new EntityRangeVariable("Color", HardCodedTestModel.GetDogTypeReference(), HardCodedTestModel.GetDogsSet()); QueryNode result = EndPathBinder.GeneratePropertyAccessQueryNode(new EntityRangeVariableReferenceNode(rangeVariable.Name, rangeVariable), property); result.ShouldBeCollectionPropertyAccessQueryNode(HardCodedTestModel.GetDogNicknamesProperty()); }
public void GenerateQueryNodeShouldReturnQueryNode() { var property = HardCodedTestModel.GetDogColorProp(); EntityCollectionNode entityCollectionNode = new EntitySetNode(HardCodedTestModel.GetDogsSet()); EntityRangeVariable rangeVariable = new EntityRangeVariable("Color", HardCodedTestModel.GetDogTypeReference(), entityCollectionNode); var result = EndPathBinder.GeneratePropertyAccessQueryNode( new EntityRangeVariableReferenceNode(rangeVariable.Name, rangeVariable), property); result.ShouldBeSingleValuePropertyAccessQueryNode(property); }