Пример #1
0
        public void MappedTypeDoesNotWriteLogWhenDisabled()
        {
            var sut = new DefaultBuildLog();

            sut.MappedType(typeof(Stream), typeof(MemoryStream));

            sut.Output.Should().BeEmpty();
        }
Пример #2
0
        public void MappedTypeThrowsExceptionWithNullTargetType()
        {
            var sut = new DefaultBuildLog {
                IsEnabled = true
            };

            Action action = () => sut.MappedType(typeof(Stream), null !);

            action.Should().Throw <ArgumentNullException>();
        }
Пример #3
0
        public void MappedTypeAppendsLogEntry()
        {
            var sut = new DefaultBuildLog {
                IsEnabled = true
            };

            sut.MappedType(typeof(Stream), typeof(MemoryStream));

            sut.Output.Should().NotBeNullOrWhiteSpace();
        }