public SetNotification ( int notificationCode, string status ) : Notification | ||
notificationCode | int | |
status | string | |
Résultat | Notification |
public void SetNotificationTest() { Trace.WriteLine("on ticket"); var os = new OpenStackMember(UserName, Password, TenantName); // with tenant var notifications = os.ListNotifications(); Assert.IsNotNull(notifications); foreach (var n in notifications) { var notification = os.GetNotification(n.NotificationCode); var prevStatus = notification.ReadStatus; notification = os.SetNotification(n.NotificationCode, "Unread"); Assert.AreEqual(notification.ReadStatus, "Unread"); notification = os.SetNotification(n.NotificationCode, "ReadTitleOnly"); Assert.AreEqual(notification.ReadStatus, "ReadTitleOnly"); notification = os.SetNotification(n.NotificationCode, "Read"); Assert.AreEqual(notification.ReadStatus, "Read"); notification = os.SetNotification(n.NotificationCode, prevStatus); notification = os.GetNotification(n.NotificationCode); Assert.AreEqual(notification.ReadStatus, prevStatus); } }