Exemple #1
0
        public ReceivingAddressPoolTests()
        {
            this.generator = Substitute.For <IAddressGenerator>();
            this.storage   = Substitute.ForPartsOf <FakeReceivingAddressStorage>();
            this.choser    = Substitute.For <IAddressChoser>();

            this.subject = new ReceivingAddressPool(this.generator, this.storage, this.choser);

            MockChoser();
        }
Exemple #2
0
        public ReceivingAddressPool(
            IAddressGenerator generator,
            IReceivingAddressStorage storage,
            IAddressChoser choser)
        {
            if (generator == null)
            {
                throw new ArgumentNullException(nameof(generator));
            }

            if (storage == null)
            {
                throw new ArgumentNullException(nameof(storage));
            }

            if (choser == null)
            {
                throw new ArgumentNullException(nameof(choser));
            }

            this.generator = generator;
            this.storage   = storage;
            this.choser    = choser;
        }