Ejemplo n.º 1
0
        public void WriteWithNullThrows()
        {
            var sut = new CompositeOutput(new StubOutput());

            Assert.Throws <ArgumentNullException>(() =>
                                                  sut.Write(null));
        }
Ejemplo n.º 2
0
        public void WriteCallsInnerOutput()
        {
            var actual  = string.Empty;
            var output1 = new DeletagingOutput(l => actual += "1");
            var output2 = new DeletagingOutput(l => actual += "2");
            var sut     = new CompositeOutput(output1, output2);

            sut.Write("line");

            Assert.Equal("12", actual);
        }