-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MC-2359] Add normalized event and property names evaluation #385
base: develop
Are you sure you want to change the base?
Conversation
@nishant-clevertap Implementation looks good to me. Please add a comment on why this is done and why we use the English locale, see the android PR for details. |
Added method docs and comment. |
- Added unit test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to define the behavior if multiple properties equal the normalized property name, for example:
NSArray *whenTriggers = @[
@{
@"eventName": @"event1",
@"eventProperties": @[
@{
@"propertyName": @"prop1",
@"operator": @1,
@"propertyValue": @"test"
}
]
}
];
match = [triggerMatcher matchEventWhenTriggers:whenTriggers eventName:@"event1" eventProperties:@{
@"Prop 1": @"test1",
@"Prop1": @"test",
@"prop1": @"test2"
}];
We also need a test for the items keys normalization.
areEqualNormalizedName:
to check if two strings are normalized equal or not.getNormalizedName:
to get normalized name after removing white spaces and converting it to lowercase with en_US locale.