Beispiel #1
0
        public async Task TestIsDelivered()
        {
            // Arrange
            var sut = new SpySender();

            // Act
            await sut.SendAsync(new DeliverMessageEnvelope(new DeliverMessage(), "", Enumerable.Empty <Attachment>()));

            // Assert
            Assert.True(sut.IsDelivered);
        }
Beispiel #2
0
        public async Task TestIsNotified()
        {
            // Arrange
            var sut = new SpySender();

            // Act
            await sut.SendAsync(new NotifyMessageEnvelope(null, default(Status), null, null, null));

            // Assert
            Assert.True(sut.IsNotified);
        }
Beispiel #3
0
        public void SpyOnConfigure()
        {
            // Arrange
            var sut = new SpySender();

            // Act
            sut.Configure(method: null);

            // Assert
            Assert.True(sut.IsConfigured);
        }
            public void SenderDelegatesConfiguration_IfNotifySender()
            {
                // Arrange
                var stubSender = new SpySender();
                var sut        = new ReliableSender(notifySender: stubSender);

                // Act
                sut.Configure(method: null);

                // Assert
                Assert.True(stubSender.IsConfigured);
            }