public void Initialize_WithNoParameters_Throws()
        {
            Dictionary <string, string> parameters = null;
            var events = Substitute.For <TestLoggerEvents>();
            var logger = new MockTestLogger();

            void Initialise() => logger.Initialize(events, parameters);

            Assert.Throws <ArgumentNullException>(Initialise);
        }
        private MockTestLogger CreateMockTestLogger(Dictionary <string, string> parameters = null)
        {
            var logger = new MockTestLogger();
            var events = Substitute.For <TestLoggerEvents>();

            parameters ??= new Dictionary <string, string>();
            parameters.Add(DefaultLoggerParameterNames.TestRunDirectory, Directory);
            logger.Initialize(events, parameters);
            return(logger);
        }
        public void Initialize_WithNoEvents_Throws()
        {
            var parameters = new Dictionary <string, string>
            {
                { Core.Constants.LogFileNameKey, string.Empty }
            };
            TestLoggerEvents events = null;
            var logger = new MockTestLogger();

            void Initialise() => logger.Initialize(events, parameters);

            Assert.Throws <ArgumentNullException>(Initialise);
        }
        public void Initialize_WithBothLogNameAndPrefix_Throws()
        {
            var parameters = new Dictionary <string, string>
            {
                { Core.Constants.LogFileNameKey, string.Empty },
                { Core.Constants.LogFilePrefixKey, string.Empty }
            };
            var events = Substitute.For <TestLoggerEvents>();
            var logger = new MockTestLogger();

            void Initialise() => logger.Initialize(events, parameters);

            Assert.Throws <ArgumentException>(Initialise);
        }