Example #1
0
        public void Constructor_NoParameters_NewDependenciesAreCreated()
        {
            var localTarget = new MessageEncryptingForwardingAppender();

            Assert.IsNotNull(localTarget.LogEventFactory);
            Assert.IsNotNull(localTarget.MessageEncryption);
        }
Example #2
0
        public void __init()
        {
            mocks = new MockRepository(MockBehavior.Strict);

            encryptorMock       = mocks.Create <IMessageEncryptor>();
            logEventFactoryMock = mocks.Create <ILoggingEventFactory>();

            _target = new MessageEncryptingForwardingAppender(encryptorMock.Object, logEventFactoryMock.Object);
        }
Example #3
0
        public void Constructor_DependenciesInjected_DependenciesAreStoredCorrectly()
        {
            var messageEncryption = new RijndaelMessageEncryptor();
            var logEventFactory   = new LoggingEventFactory();

            var localTarget = new MessageEncryptingForwardingAppender(messageEncryption, logEventFactory);

            Assert.AreSame(messageEncryption, localTarget.MessageEncryption);
            Assert.AreSame(logEventFactory, localTarget.LogEventFactory);
        }