Beispiel #1
0
        public void NewLine_WritesDefaultLineTerminatorToScrawler()
        {
            var scrawlerMock = new Mock <Scrawler>();
            var context      = new WriteContext(scrawlerMock.Object);

            scrawlerMock.Setup(s => s.Write(context.LineTerminator))
            .Verifiable();

            context.NewLine();

            NotNull(context.LineTerminator);
            scrawlerMock.Verify();
        }
Beispiel #2
0
        public void NewLine_WritesToScrawler(string lineTerminator)
        {
            var scrawlerMock = new Mock <Scrawler>();
            var context      = new WriteContext(scrawlerMock.Object);

            context.LineTerminator = lineTerminator;

            scrawlerMock.Setup(s => s.Write(lineTerminator))
            .Verifiable();

            context.NewLine();

            Equal(lineTerminator, context.LineTerminator);
            scrawlerMock.Verify();
        }