public void IconEncodingDecoding() { var request = new UIRequest(); MessageDictionary dictionary = this.MessageDescriptions.GetAccessor(request); Assert.IsFalse(dictionary.ContainsKey("icon")); Assert.IsFalse(request.Icon.HasValue); dictionary["icon"] = "true"; Assert.IsTrue(request.Icon.Value); dictionary.ClearValues(); request.Icon = true; Assert.AreEqual("true", dictionary["icon"]); }
private static MessageDictionary MessageCallback() { var result = new MessageDictionary(); var messageData = ServiceLocator.Resolve <IErrorMessageManagement>().ListAll().Data; foreach (var message in messageData) { if (!result.ContainsKey(message.BranchID)) { result.Add(message.BranchID, new List <Message>()); } result[message.BranchID].Add(new Message(message.MessageID, message.VNMessage, message.ENMessage)); } return(result); }