Ejemplo n.º 1
0
                public void ShouldCallReadByteOnce()
                {
                    var mockInput = new Mock <IInputStream>();

                    mockInput.Setup(x => x.ReadByte()).Returns(0xFF);

                    var u = new PackStream.Unpacker(mockInput.Object, new BigEndianTargetBitConverter());

                    u.UnpackStructSignature().Should().Be(0xFF);
                    mockInput.Verify(x => x.ReadByte(), Times.Once);
                }