Example #1
0
        public void Initialize()
        {
            ID = (ushort)new Random().Next();

            var DNSCryptOptions = new DNSCryptOptions()
            {
                Stamp   = Stamp.FromString("sdns://AQYAAAAAAAAADTkuOS45LjEwOjg0NDMgZ8hHuMh1jNEgJFVDvnVnRt803x2EwAuMRwNo34Idhj4ZMi5kbnNjcnlwdC1jZXJ0LnF1YWQ5Lm5ldA"),
                Timeout = 2000
            };

            var DNSCryptOptionsMonitor = Mock.Of <IOptionsMonitor <DNSCryptOptions> >(Options => Options.CurrentValue == DNSCryptOptions);

            Resolver = new Protocols.DNSCrypt(DNSCryptOptionsMonitor);

            RequestMessage = new Message()
            {
                ID = ID,
                RecursionDesired = true,
                Questions        = new List <IQuestion>()
                {
                    new Question()
                    {
                        Domain = Domain.FromString("www.youtube.com"),
                        Class  = RecordClass.Internet,
                        Type   = RecordType.A
                    }
                }
            };
        }