示例#1
0
        private string SetupRaiseCredit(decimal credit)
        {
            // arrange
            Action action = () => controlUnit.State.RaiseCredit(credit);

            // act
            return(TestHelperMethods.CaptureConsoleOutput(action));
        }
示例#2
0
        private string SetupSelectProduct(Coordinates coords, decimal?credit)
        {
            // arrange
            ConditionallyAssignCredit(credit);
            Action action = () => controlUnit.State.SelectProduct(coords);

            // act
            return(TestHelperMethods.CaptureConsoleOutput(action));
        }
示例#3
0
        private string SetupTryDeliverStock(Coordinates?coords, decimal?credit)
        {
            // arrange
            ConditionallyAssignCredit(credit);
            if (coords.HasValue)
            {
                controlUnit.State.SelectProduct(coords.Value);
            }

            Action action = () => controlUnit.State.TryDeliverProduct();

            // act
            return(TestHelperMethods.CaptureConsoleOutput(action));
        }