private string SetupRaiseCredit(decimal credit) { // arrange Action action = () => controlUnit.State.RaiseCredit(credit); // act return(TestHelperMethods.CaptureConsoleOutput(action)); }
private string SetupSelectProduct(Coordinates coords, decimal?credit) { // arrange ConditionallyAssignCredit(credit); Action action = () => controlUnit.State.SelectProduct(coords); // act return(TestHelperMethods.CaptureConsoleOutput(action)); }
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)); }