assert_equals(userNotification.textContents.progressValue, progressValueToSet, "progressValue is incorrect.");
assert_equals(userNotification.textContents.progressType, progressTypeToSet, "progressType is incorrect.");
- assert_equals(userNotification.userType, statusType, "userType is incorrect.");
+ assert_equals(userNotification.userType, postedNotification.userType, "userType is incorrect.");
- assert_equals(notification.images.subIconPath, subIconPathToSet, "subIconPath is incorrect.");
- assert_equals(notification.images.backgroundImagePath, backgroundImagePathToSet, "backgroundImagePath is incorrect.");
+ assert_equals(userNotification.images.subIconPath, subIconPathToSet, "subIconPath is incorrect.");
+ assert_equals(userNotification.images.backgroundImagePath, backgroundImagePathToSet, "backgroundImagePath is incorrect.");
assert_array_equals(userNotification.thumbnails.thumbnails, thumbnailsToSet, "thumbnails attribute.");
assert_equals(userNotification.textContents.detailInfo.length, detailInfoToSet.length, "detailInfo attribute length.");
userNotification.leds.ledOffPeriod = 125;
assert_equals(userNotification.leds.ledOffPeriod, 125, "userNotification.leds.ledOffPeriod value after set");
- notificationDict.ledOffPeriod = 100;
+ notificationDict.leds.ledOffPeriod = 100;
+
userNotification = new tizen.UserNotification(userNotificationType, titleToSet, notificationDict);
- assert_equals(userNotification.leds.ledOffPeriod, notificationDict.ledOffPeriod, "userNotification.leds.ledOffPeriod value from constructor");
+ assert_equals(userNotification.leds.ledOffPeriod, notificationDict.leds.ledOffPeriod, "userNotification.leds.ledOffPeriod value from constructor");
- assert_own_property(userNotification, "ledOnPeriod", "StatusNotification doesn't own statusType property.");
+ assert_own_property(userNotification.leds, "ledOnPeriod", "userNotification doesn't own statusType property.");
assert_type(userNotification.leds.ledOnPeriod, "unsigned long", "userNotification.leds.ledOnPeriod should be number");
- assert_equals(userNotification.leds.ledOnPeriod, 0, "userNotification.leds.ledOnPeriod default value");
userNotification.leds.ledOnPeriod = 125;
assert_equals(userNotification.leds.ledOnPeriod, 125, "userNotification.leds.ledOnPeriod value after set");
- notificationDict.actions.ledOnPeriod = 100;
+ notificationDict.leds.ledOnPeriod = 100;
userNotification = new tizen.UserNotification(userNotificationType, titleToSet, notificationDict);
- assert_equals(userNotification.leds.ledOnPeriod, notificationDict.actions.ledOnPeriod, "userNotification.leds.ledOnPeriod value from constructor");
+ assert_equals(userNotification.leds.ledOnPeriod, notificationDict.leds.ledOnPeriod, "userNotification.leds.ledOnPeriod value from constructor");
userNotification.leds = null;
assert_equals(userNotification.leds, null, "userNotification.leds after set null");
userNotification = new tizen.UserNotification(userNotificationType, titleToSet);
- assert_equals(userNotification.leds.ledOffPeriod, 0, "userNotification.leds.ledOnPeriod default value");
+ assert_equals(userNotification.leds.ledOnPeriod, 0, "userNotification.leds.ledOnPeriod default value");
assert_equals(userNotification.leds.ledOffPeriod, 0, "userNotification.leds.ledOffPeriod default value");
}, document.title);
userNotification.textContents.progressType = percentageValue;
assert_equals(userNotification.textContents.progressType, percentageValue, "progressType attribute - assignment.");
-
- userNotification = new tizen.UserNotification(userNotificationType, titleToSet);
- assert_equals(userNotification.textContents.progressType, "PERCENTAGE", "progressType attribute default not set.");
check_not_nullable(userNotification.textContents, "progressType");
assert_own_property(userNotification.textContents, "progressValue", "UserNotification doesn't own progressValue property.");