public CorruptedDataTests() { _data = new byte[1024]; _stream = new MemoryStream(_data); _fooLogger = new FooLogger(_stream, new byte[128]); _logDecoder = new LogDecoder(128, new IChannelDecoder[] { new FooDecoder(new CustomArgumentDecoder()) }); }
public TracerTests() { _stream = new MemoryStream(1024); _tracer = new SampleTracer(); _logger = new FooLogger(_stream, new byte[64], _tracer); _decoder = new LogDecoder(128, new IChannelDecoder[] { new FooDecoder(new CustomArgumentDecoder()) }); }
public void BadStreamTest() { Assert.Throws <BinLogException>(() => new FooLogger(new MockStream(), new byte[16])); var emptyDecoder = new LogDecoder(42, new IChannelDecoder[] {}); Assert.Throws <BinLogException>(() => emptyDecoder.Decode(new MockStream()).First()); }
public EncodeDecodeTests() { var buffer = new byte[128]; _fooLogger = new FooLogger(_stream, buffer); _barLogger = new BarLogger(_stream, buffer); var argDecoder = new CustomArgumentDecoder(); _fooDecoder = new FooDecoder(argDecoder); _barDecoder = new BarDecoder(argDecoder); _logDecoder = new LogDecoder(128, new IChannelDecoder[] { _fooDecoder, _barDecoder }); }