Ejemplo n.º 1
0
        public void ShouldCallGetCodeWhenGeTerminalCode()
        {
            // Given
            var           order        = Substitute.For <IOrder>();
            IOrderRequest orderRequest = new OrderRequest(order);

            // When
            orderRequest.GetTerminalCode();

            // Then
            order.Received().GetCode();
        }
Ejemplo n.º 2
0
        public void ShouldReturnCodeFromOrder(string expectedCode)
        {
            // Given
            var order = Substitute.For <IOrder>();

            order.GetCode().Returns(expectedCode);
            IOrderRequest orderRequest = new OrderRequest(order);

            // When
            var orderCode = orderRequest.GetTerminalCode();

            // Then
            orderCode.Should().Be(expectedCode);
        }