Ejemplo n.º 1
0
        public void GetPrice_SingleHose_ReturnsHosePrice()
        {
            var status = string.Empty;
            _mockIO.Setup(c => c.SendAndReceive(WayneCommands.GetPrice, "01", ref status))
                .Callback(() => status = "00")
                .Returns("0000000002890");
                
            var forecourt = new Wayne(_mockIO.Object);

            var price = forecourt.GetPrice(new Hose(1));
            forecourt.Dispose();

            status.Should().Be("00");
            price.Should().Be(2.890d);
        }