コード例 #1
0
        public void Read_Works()
        {
            var dict = new NSDictionary();

            dict.Add("Command", "RelayNotification");
            dict.Add("Name", "com.apple.mobile.application_installed");

            var value = NotificationProxyMessage.Read(dict);

            Assert.Equal("RelayNotification", value.Command);
            Assert.Equal("com.apple.mobile.application_installed", value.Name);
        }
コード例 #2
0
        public void ToPropertyList_Works()
        {
            var value = new NotificationProxyMessage()
            {
                Command = "RelayNotification",
                Name    = "com.apple.mobile.application_installed",
            };

            var dict = value.ToPropertyList();

            Assert.Collection(
                dict,
                (v) =>
            {
                Assert.Equal("Command", v.Key);
                Assert.Equal("RelayNotification", v.Value.ToObject());
            },
                (v) =>
            {
                Assert.Equal("Name", v.Key);
                Assert.Equal("com.apple.mobile.application_installed", v.Value.ToObject());
            });
        }
コード例 #3
0
 public void ReadAsync_ValidatesArguments()
 {
     Assert.Throws <ArgumentNullException>(() => NotificationProxyMessage.Read(null));
 }