Esempio n. 1
0
        public void FromDictionary_WithError_Works()
        {
            var dict = new NSDictionary();

            dict.Add("Error", "PairingDialogResponsePending");

            var value = new PairResponse();

            value.FromDictionary(dict);

            Assert.Equal(LockdownError.PairingDialogResponsePending, value.Error);
            Assert.Null(value.EscrowBag);
        }
Esempio n. 2
0
        public void FromDictionary_WithEscrowBag_Works()
        {
            var dict = new NSDictionary();

            byte[] data = new byte[] { 1, 2, 3, 4 };

            dict.Add("EscrowBag", data);

            var value = new PairResponse();

            value.FromDictionary(dict);

            Assert.Null(value.Error);
            Assert.Equal(data, value.EscrowBag);
        }
Esempio n. 3
0
        public void FromDictionary_ValidatesArguments()
        {
            var response = new PairResponse();

            Assert.Throws <ArgumentNullException>(() => response.FromDictionary(null));
        }