Unit Testing & GetModelPropertyType
# help-with-umbraco
i
I'm currently trying to setup some unit tests, and hitting an issue with GetModelPropertyType in my underlying code failing due. I've setup a mocked umbracoContext & snapshot. I've mocked the member type, and added the property & value, but when I make a call to my mocked service this line is failing: var matchingMembers = _memberService.GetMembersByPropertyValue(AzureAdmember.GetModelPropertyType(_publishedSnapshotAccessor, p => p.MemberId).Alias, wearerId); and it seems to be related to the GetModelPropertyType method of AzureAdmember. If I replace AzureAdmember.GetModelPropertyType(_publishedSnapshotAccessor, p => p.MemberId).Alias with the string alias "memberId", my unit test works. Any ideas??