Esempio n. 1
0
        public void constructor_should_use_DnsClientWrapper_when_dnsResolver_is_null()
        {
            var eventSubscriber = Mock.Of <IEventSubscriber>();

            var result = new DnsMonitorFactory(eventSubscriber, dnsResolver: null);

            result._dnsResolver().Should().BeOfType <DnsClientWrapper>();
        }
Esempio n. 2
0
        public void constructor_should_initialize_instance()
        {
            var eventSubscriber = Mock.Of <IEventSubscriber>();
            var dnsResolver     = Mock.Of <IDnsResolver>();

            var result = new DnsMonitorFactory(eventSubscriber, dnsResolver);

            result._dnsResolver().Should().BeSameAs(dnsResolver);
            result._eventSubscriber().Should().BeSameAs(eventSubscriber);
        }