Example #1
0
        public void PostBuildActionDoesNotWriteLogWhenDisabled()
        {
            var postBuildType = typeof(DummyPostBuildAction);

            var sut = new DefaultBuildLog();

            sut.PostBuildAction(typeof(string), postBuildType, null !);

            sut.Output.Should().BeEmpty();
        }
Example #2
0
        public void PostBuildActionThrowsExceptionWithNullPostBuildType()
        {
            var type = typeof(string);

            var sut = new DefaultBuildLog {
                IsEnabled = true
            };

            Action action = () => sut.PostBuildAction(type, null !, null !);

            action.Should().Throw <ArgumentNullException>();
        }
Example #3
0
        public void PostBuildActionAppendsLogEntry()
        {
            var postBuildType = typeof(DummyPostBuildAction);

            var sut = new DefaultBuildLog {
                IsEnabled = true
            };

            sut.PostBuildAction(typeof(string), postBuildType, null !);

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