public void WriteWithNullThrows() { var sut = new CompositeOutput(new StubOutput()); Assert.Throws <ArgumentNullException>(() => sut.Write(null)); }
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); }